From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11888 Path: news.gmane.org!.POSTED!not-for-mail From: jacob@welshcomputing.com Newsgroups: gmane.linux.lib.musl.general Subject: strftime %Z returning empty string Date: Thu, 31 Aug 2017 16:23:08 -0400 (EDT) Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1504211329 468 195.159.176.226 (31 Aug 2017 20:28:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2017 20:28:49 +0000 (UTC) User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) To: musl@lists.openwall.com Original-X-From: musl-return-11901-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 31 22:28:45 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dnW4q-0007rH-Vz for gllmg-musl@m.gmane.org; Thu, 31 Aug 2017 22:28:37 +0200 Original-Received: (qmail 8132 invoked by uid 550); 31 Aug 2017 20:28:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3675 invoked from network); 31 Aug 2017 20:23:20 -0000 Original-Sender: jwelsh@ny1.eemta.org Xref: news.gmane.org gmane.linux.lib.musl.general:11888 Archived-At: 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