modifying a time.struct_time
Ulrich Eckhardt
ulrich.eckhardt at dominolaser.com
Fri Dec 16 08:32:03 EST 2011
More information about the Python-list mailing list
Fri Dec 16 08:32:03 EST 2011
- Previous message (by thread): modifying a time.struct_time
- Next message (by thread): modifying a time.struct_time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 16.12.2011 10:45, schrieb Ulrich Eckhardt: > I'm trying to create a struct_time that is e.g. one year ahead or a > month back in order to test some parsing/formatting code with different > dates. There is something I stumbled across that helps and that is the datetime module, which seems more reasonably pythonic, and which allows operations on dates like adding a Concerning the idea to use seconds, I'd rather not, because already the number of seconds per minute ranges from 60 to 62, and it doesn't get better with things like months (28...31 days), years (365...366 days) and all other types built upon them. Considering the question if the current state is buggy, I'm definitely +1 on it. I do understand that this API is not going to change, but explicitly documenting in "help(time)" that the order is fixed and possibly making the order programmatically available are not changes but useful additions, IMHO. Also, conversion from/to a dict and perhaps a link to the datetime module would have saved me some futile attempts. Thanks to all responders, I wish you a happy weekend! Uli
- Previous message (by thread): modifying a time.struct_time
- Next message (by thread): modifying a time.struct_time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list