Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 19 Apr 2017 18:44:05 +0200
From: Szabolcs Nagy <>
Cc: Steve Coffman <>
Subject: Re: strptime.c missing timezone z case

* Steve Coffman <> [2017-04-19 14:03:18 +0000]:
> I noticed that musl does not support timezone formats that include %z or %Z for timezone, unlike glibc.
> Both %d/%b/%Y:%H:%M:%S %z and %d/%b/%Y:%H:%M:%S %Z for instance. 

code using %z or %Z in strptime is nonconforming and thus
nonportable so it should be fixed (it will break not just
on musl).

that said it's a commonly requested feature, but the exact
requirements are not known, different implementations
handle %z differently (some support iso 8601 format only,
others support rfc822 style zone specifiers too) %Z i think
is even more inconsistent across implementations.

> When I change the timeformat to %d/%b/%Y:%H:%M:%S +0000 it works fine. Since we always use UTC, this works around the problem for us, but will affect any Alpine linux (docker) users that don't.
> Looking through the musl source code to strptime.c <> and strftime.c <> I see that while strftime.c has a z case, strptime.c does not. My C is weak so that's about all I can suss out. Not sure if that's at all helpful.
> More details of my investigation are here:
> For comparison, glibc handles it this way:

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.