Maksim Kasimov wrote: > hi all, sorry if i'm reposting > > why time.strptime and time.localtime returns tuple with different DST (9 > item of the tuple)?
I've been bitten by the quirks in the time modules so many times that I would advice against using it for any date handling. It's ok for time measurement as long as you understand the differences between time.clock and time.time on your particular platform. You should be aware that it's just a thin wrapper around the c libs, and they seem to disagree wildly among platforms on how things should be done. On NT 4 for instance, the C time libs was a few weeks off concerning when DST starts in Europe (but the win32 API was correct), time zone names vary among platforms etc. There is an inverse of localtime() in mktime(), but no inverse of gmtime() etc. Yuk! I would suggest that you either update Python to 2.4 (or 2.3) and use the datetime module, or that you get mxDateTime if you are stuck with 2.2. -- http://mail.python.org/mailman/listinfo/python-list