[Python-bugs-list] [ python-Bugs-779506 ] strftime returns empty strings with %Z when giving instant

SourceForge.net noreply@sourceforge.net
Tue, 29 Jul 2003 05:21:09 -0700


Bugs item #779506, was opened at 2003-07-29 12:59
Message generated for change (Comment added) made by jackjansen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=779506&group_id=5470

Category: Macintosh
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Mac-arena the Bored Zo (boredzo)
Assigned to: Jack Jansen (jackjansen)
Summary: strftime returns empty strings with %Z when giving instant

Initial Comment:
I begin with %Z, no instant:

>>> time.strftime('%Y-%m-%d %I.%M.%S %Z')
'2003-07-29 03.49.17 PDT'

now I add the instant:

>>> time.strftime('%Y-%m-%d %I.%M.%S %Z', time.localtime())
''

variation on the same:

>>> time.strftime('%Y-%m-%d %I.%M.%S %Z', time.localtime(time.time()))
''

and now I drop the %Z but keep the instant:

>>> time.strftime('%Y-%m-%d %I.%M.%S', time.localtime(time.time()))
'2003-07-29 03.51.42'

my build info:

>>> import sys; sys.version
'2.3c2 (#1, Jul 28 2003, 13:47:18) \n[GCC 2.95.2 19991024 (release)]'

this is on Darwin 5.5 (Mac OS X 10.1.5) using a framework installation.

----------------------------------------------------------------------

>Comment By: Jack Jansen (jackjansen)
Date: 2003-07-29 14:21

Message:
Logged In: YES 
user_id=45365

It works for me, on MacOSX 10.2.6:
>>> time.strftime('%Y-%m-%d %I.%M.%S %Z', 
time.localtime(time.time()))
'2003-07-29 02.22.10 CEST'

 I haven't tested anything on 10.1 for a long time, I'll do so later 
this week.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-07-29 13:42

Message:
Logged In: YES 
user_id=33168

These work for me on Linux (rh9).  My guess is that this is
a platform specific problem.  Jack, can you test/confirm
this behaviour?

boredzo how did you find this problem?  Did a test fail or
did you just discover it?  Perhaps we should add a test case?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=779506&group_id=5470