Time zone support is wrong.
Closed this issue · 3 comments
According to ISO8601, the time zone is represented either by ±HH, or ±HHMM, or by a single letter 'Z' for UTC.
In the code a simple %z is used, which omits the '±' delimiter. This is wrong and has to be corrected.
convert_format(iso8601) -> <<"%Y-%m-%dT%H:%M:%S%z">>;
%z
takes care of ± delimiter, at least that's what the manpage is saying:
%z is replaced by the time zone offset from UTC; a leading plus sign stands for east of UTC,
a minus sign for west of UTC, hours and minutes follow with two digits each and no delimiter
between them (common form for RFC 822 date headers).
However, it seems, that libc
doesn't support Z
and expects an empty string for UTC.
Perhaps, but in the README there's the following clause:
(tempo_dev@localhost)1> {ok, Bin} = tempo:format(iso8601, {now, now()}). {ok,<<"2012-06-01T19:06:420000">>}
Which clearly shows there's no ±. Why is that?
Thanks for contribution!