Message31113
The datetime.fromtimestamp() function works fine with integer timestamps and positive fractional timestamps, but fails if I pass a negative fractional timestamp. For example:
>>> import datetime
>>> datetime.datetime.fromtimestamp(-1.05)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: microsecond must be in 0..999999
It should return the same result as datetime.fromtimestamp(-1) - timedelta(seconds=.5).
The same bug can be triggered in datetime.utcfromtimestamp().
I have been able to reproduce this bug in Python 2.4.4 and Python 2.5 on Linux. |
|
Date |
User |
Action |
Args |
2007-08-23 14:51:35 | admin | link | issue1646728 messages |
2007-08-23 14:51:35 | admin | create | |
|