mailing list of musl libc
 help / color / mirror / code / Atom feed
* strftime %Z returning empty string
@ 2017-08-31 20:23 jacob
  2017-08-31 20:44 ` A. Wilcox
  2017-09-04 23:27 ` musl's asctime catches Python bug jacob
  0 siblings, 2 replies; 7+ messages in thread
From: jacob @ 2017-08-31 20:23 UTC (permalink / raw)
  To: musl

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-05  0:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 20:23 strftime %Z returning empty string jacob
2017-08-31 20:44 ` A. Wilcox
2017-08-31 21:12   ` jacob
2017-08-31 21:56     ` Rich Felker
2017-09-01  8:57   ` Szabolcs Nagy
2017-09-04 23:27 ` musl's asctime catches Python bug jacob
2017-09-05  0:08   ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).