Can I trust mktime ?
Tim Howarth
tim at worthy.demon.co.uk
Sat Dec 22 16:12:58 EST 2001
More information about the Python-list mailing list
Sat Dec 22 16:12:58 EST 2001
- Previous message (by thread): Python 2.2 RPMs are here
- Next message (by thread): Can I trust mktime ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To find the date in 4 months time I've added to the months element of a list copy of a localtime tuple. (Which obvioulsy means months can be >12.) Is converting this to a time() value with mktime then reading back with localtime() considered correct/safe ? All I know is it seems to work, I'd rather not load something like mxDateTime as it's a simple task. now=time.localtime(time.time()) print now then=list(now) then[1]+=4 then=time.mktime(then) then=time.localtime(then) print then -- ___ |im ---- ARM Powered ----
- Previous message (by thread): Python 2.2 RPMs are here
- Next message (by thread): Can I trust mktime ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list