Roy Smith wrote: > Peter Hansen <[EMAIL PROTECTED]> wrote: >>Using time.time() doesn't appear to be suitable, since time might jump >>forwards or backwards at the user's whim, if the system clock is reset, >>or when a daylight savings time change occurs. > > If you get the UTC time, daylight savings time doesn't enter the equation.
Hmmm... not only that, but at least under XP the return value of time.time() _is_ UTC. At least, it's entirely unaffected by the daylight savings time change, or (apparently) by changes in time zone. Looks like time.time() might be sufficient. (That might be what Roy intended, but I initially thought he meant time.gmtime(time.time()), which could have resulted in a race condition if time.time() jumped ahead or back separately from some internal daylight savings time flag, and the value was read between the two operations.) -Peter -- http://mail.python.org/mailman/listinfo/python-list