time.daylight (Daylight Saving Time)

Richard van de Stadt stadt at cs.utwente.nl
Mon Nov 5 13:59:39 CET 2001


Hi,

I'm using time.tzname[time.daylight] to display the time zone. This worked
fine as long a Daylight Saving Time (DST) was valid, since time.tzname is
e.g. this:

>>> tzname
('MET', 'MEST')

time.__docs__ shows this, concerning DST:

---
DST (Daylight Savings Time) flag (-1, 0 or 1)
If the DST flag is 0, the time is given in the regular time zone;
if it is 1, the time is given in the DST time zone;
if it is -1, mktime() should guess based on the date and time.
---

However, now that DST is over, time.daylight keeps on being 1 (on the
5 systems located in different time zones that I've tried).

There's no time.py, so I'm clueless about how time.daylight is supposed
to be updated. Any ideas? Is it perhaps only set at compile time (just
guessing).

Richard.



More information about the Python-list mailing list