Date issue Win98 vs NT

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Wed Jul 2 05:14:04 EDT 2003


On Wed, 02 Jul 2003 03:50:10 GMT, rumours say that "Stan Cook"
<scook at elp.rr.com> might have written:

>Has anyone else had this or a similar problem and is there a workaround?

>This piece of code:

>from time import gmtime, strftime
>_log = _log + "\\" + strftime("%m%d%y", gmtime()) + ".log"

>produces a file with the name 'today's date.log' on NT, but creates a file
>called 'tomorrow's date.log' on Windows 98.  I would really like to know
>why this happens.  Any help offered is very much appreciated.

Are you by any chance in Austin, Texas?

I could guess that first you tried this code in Windows NT, and later
rebooted to Windows 98.  Running your code on Windows 98 happened after
6pm, your local time.

By that time, I think it is already tomorrow in Greenwich, England
(which is what gmtime provides).  Try localtime instead (assuming your
timezone is set correctly both in NT and 98).
-- 
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.




More information about the Python-list mailing list