Without your code, it's hard to tell.

Here's a small program I wrote:
    import time

    t = time.time()
    print time.localtime(t - 86400)
    print time.localtime(t)
on both lines, the tm_isdst flag is the same.

If I choose two times that are on either side of the DST change in
my timezone, I get different answers:
    import time
     
    t = time.time()
    print time.localtime(t)
    print time.localtime(t+86400 * 90)
Here, I get different values for tm_isdst because DST is in effect for
one of the times but not the other.

> I have _no_ idea on how localtime() could reasonably synthesize
> different values for that flag for _any_ time value converted in about
> the same millisecond. What gives?

The tm_isdst field is not about the DSTness at the time of
conversion---it's about the DSTness of the converted time.

Jeff

Attachment: pgpNFKAG8aJuW.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to