Date issue Win98 vs NT

Stan Cook scook at elp.rr.com
Wed Jul 2 22:51:17 EDT 2003


Thanks!!  You were right on with that one.  I've been working on the program
at home and work.  At work with NT and 98 at home.  I changed all of the
gmtime references to localtime and everything came out correct.

Thanks again....

Stan
"Christos TZOTZIOY Georgiou" <tzot at sil-tec.gr> wrote in message
news:cb85gvgtf2657aon58qu4p3qorvfpbi79v at 4ax.com...
> 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