bitwalker / bitwalker/timex

Half/Quarter hour timezones are treated as invalid timezones

Open
#394 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.8k
Forks
407
PR merge metrics
No merged PRs in 30d

Description

Thanks for this great library!

###Steps to reproduce

```
iex(1)> time = "2017-01-02T02:00:00+08:45"
"2017-01-02T02:00:00+08:45"
iex(2)> {:ok, date } = Timex.parse(time, "{ISO:Extended:Z}")
{:ok, #}
iex(3)> Timex.shift(date, hours: -2)
** (FunctionClauseError) no function clause matching in Timex.Timezone.parse_offset/1
(timex) lib/timezone/timezone.ex:232: Timex.Timezone.parse_offset("8:45")
(timex) lib/timezone/timezone.ex:204: Timex.Timezone.do_get/3
(timex) lib/timezone/timezone.ex:353: Timex.Timezone.resolve/3
(timex) lib/datetime/datetime.ex:406: Timex.Protocol.DateTime.shift_by/3
(timex) lib/datetime/datetime.ex:249: Timex.Protocol.DateTime.apply_shifts/2
```

### Description of issue

- What are the expected results?
** +08:45 Is a valid offset.
** https://en.wikipedia.org/wiki/UTC%2B08:45

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.