Alexander Belopolsky added the comment:

I'll let others fight this battle.  In my view, introducing floating point 
timestamp method for datetime objects was a mistake.  See issue #2736.  

Specifically, I would like to invite Velko Ivanov to rethink his rant at 
msg124197.

If anyone followed his advise and started using timestamp method to 
JSON-serialize datetimes around 3.3, have undoubtedly being bitten by the 
present bug (but may not know it yet.)

For those who need robust code, I will continue recommending (dt - 
EPOCH)/timedelta(seconds=1) expression over the timestamp method and for JSON 
serialization (dt - EPOCH) // datetime.resolution to convert to integers and 
EPOCH + n * datetime.resolution to convert back.

----------
nosy: +vivanov

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23517>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to