strftime weirdness 
Author Message
 strftime weirdness

I clearly don't understand timezones. Can somebody please explain why I
get +0000 for both these time tuples, with the first two calls to
strftime() ?

Quote:
>>> p

(1970, 1, 1, 0, 0, 0, 3, 1, 0)
Quote:
>>> q

(1970, 1, 1, 0, 0, 0, 3, 1, 1)
Quote:
>>> time.strftime("%d %b %Y %H:%M:%S %z", p)

'01 Jan 1970 00:00:00 +0000'
Quote:
>>> time.strftime("%d %b %Y %H:%M:%S %z", q)

'01 Jan 1970 00:00:00 +0000'
Quote:
>>> time.strftime("%d %b %Y %H:%M:%S %Z", q)

'01 Jan 1970 00:00:00 BST'
Quote:
>>> time.strftime("%d %b %Y %H:%M:%S %Z", p)

'01 Jan 1970 00:00:00 GMT'

--
Graham Ashton



Sun, 03 Oct 2004 21:18:23 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. GAWK: strftime("%z") and portability (which version of strftime is used in compile?)

2. Localized strftime() output

3. unix time and strftime

4. strftime * date calculations

5. Q: inverse of strftime

6. strftime year

7. time.strftime BUG?

8. strftime: %Z, timezone, and all that

9. strftime ?

10. strftime and windows

11. bug in time.strftime on linux???

12. strftime() invalid output

 

 
Powered by phpBB® Forum Software