|   | 
| 
 | 
Message-ID: <alpine.DEB.2.00.1708311558400.12602@ny1.eemta.org>
Date: Thu, 31 Aug 2017 16:23:08 -0400 (EDT)
From: jacob@...shcomputing.com
To: musl@...ts.openwall.com
Subject: strftime %Z returning empty string
Hello,
I've been working through the Python test suite (2.7.13) on musl (1.1.16). 
There were a couple over-zealous tests involving errno, and locale tests 
that I'd expect to fail, but one set of failures I haven't yet been able 
to rule out as a musl bug. Symptom:
     >>> time.strftime('%Z')
     'GMT'
     >>> time.strftime('%Z', time.localtime())
     ''
The Python docs say these should be equivalent.
The implementation is about what you'd expect: if the second argument to 
time.strftime() is omitted, it passes the results of C localtime() 
directly to strftime(); otherwise it builds a "struct tm" by "memset"ing 
to '\0' then assigning the public fields (which of course don't include a 
time zone).
Bug? Bad assumption on their part? Nonsensical standard?
Thanks,
J. Welsh
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.