470,632 Members | 2,554 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,632 developers. It's quick & easy.

time.strftime Timezone issue

I feel that the '%Z' format specifier from strftime() returns the wrong
value when daylight savings is in effect.

Today the following is always true:
time.strftime('%Z') == time.tzname[0]

Shouldn't it be:
time.strftime('%Z') == time.tzname[time.daylight]

-allen
Jul 18 '05 #1
1 2108
Never mind,

I just looked at Modules/timemodule.c and now I realize it that
time.strftime() is just a wrapper for the c library function of the same
name.

I guess I'll just live with my 'time.tzname[time.daylight]' code.

-allen
Allen Unueco wrote:
I feel that the '%Z' format specifier from strftime() returns the wrong
value when daylight savings is in effect.

Today the following is always true:
time.strftime('%Z') == time.tzname[0]

Shouldn't it be:
time.strftime('%Z') == time.tzname[time.daylight]

-allen

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by fowlertrainer | last post: by
1 post views Thread by Roger Leigh | last post: by
3 posts views Thread by Ilja Booij | last post: by
1 post views Thread by Benny Schudel | last post: by
2 posts views Thread by mac11 | last post: by
3 posts views Thread by R*a*h*u*L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.