time Module Inconsistencies
Neal Norwitz
neal at metaslash.com
Thu Feb 20 18:19:43 EST 2003
On Thu, 20 Feb 2003 05:46:23 -0500, Andrew Markebo wrote:
> / 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.
>
> 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)
New in 2.3, thanks to Brett Cannon, Python implements it's own strptime.
I can't remember if the C implementation is used by default or if the
Python version is always used (assuming a C version exists).
The API attempts to follow what is normal for most platforms.
However, each platform has it's own quirks.
Neal
More information about the Python-list
mailing list