Bug in time module?

Gordon McMillan gmcm at hypernet.com
Wed Sep 8 08:37:57 EDT 1999


lec wrote:

> Is this considered a bug since there is no Feb 31, 1999 or Feb 29,
> 1999?
> 
> >>> import time
> >>> time.strptime('31/02/1999', "%d/%m/%Y")

to which Berthold added:

> More very strange things happen for me on linux:

[snip everyday is Sunday]

The only editing Python's time module does is to ensure that you've 
passed the right number and kind of args. Everything else is the 
result of your platform's implementation of strptime. If you want 
something _good_, you should probably use MA Lemburg's mxDateTime.


- Gordon




More information about the Python-list mailing list