bitwalker / timex

A complete date/time library for Elixir projects.

Home Page:https://hexdocs.pm/timex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Half-hour negative timezone formatting

vinibrsl opened this issue · comments

Steps to reproduce

Call Timex.TimezoneInfo.format_offset/1 with a half-hour negative timezone, e.g. UTC-9:30.

%Timex.TimezoneInfo{abbreviation: "-0930", full_name: "Pacific/Marquesas", offset_std: 0, offset_utc: -34200}
|> Timex.TimezoneInfo.format_offset()
# "-09:-30:00"

Description of issue

Formatting half-hour negative timezones returns "-09:-30:00", and I was expecting "-09:30:00", without that additional minute minus sign. I may be wrong, but is that the conventional formatting for offsets like that?