Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Time zone support is wrong. #8

Closed
vlm opened this Issue · 3 comments

3 participants

@vlm

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">>;

@superbobry superbobry was assigned
@superbobry
Collaborator

%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.

@vlm
vlm commented

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?

@superbobry superbobry closed this in 4c8bb4b
@si14
Collaborator

Thanks for contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.