time Module Inconsistencies
andrew.markebo at telia.com
Thu Feb 20 11:46:23 CET 2003
/ Martin Miller <mmiller at tx3_DELTHIS_.com> wrote:
| In the standard Python time module, the item at index 6 of the "time
| tuple" which is returned from gmtime() and localtime() is defined to
| be an integer in the range [0,6] where Monday is 0.
| However, the "%w" format directive to strftime(), when given the same
| sort of tuple, returns a weekday number decimal string where Sunday
| equals 0.
Or use "%u-1", then you don't need to rotate..
%u The day of the week as a decimal, range 1 to 7,
Monday being 1. See also %w. (SU)
p.s. Hmm does python use strptime on systems that have it, or does it
use its own strptime.py or whatever? (don't think it is python to
blame.. it is the OS'es under python whose strptime is used)
The eye of the beholder rests on the beauty!
More information about the Python-list