time.strftime Timezone issue

A

Allen Unueco

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
 
A

Allen Unueco

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top