Message246334
| Author |
belopolsky |
| Recipients |
belopolsky, ethan.furman, larry, mark.dickinson, r.david.murray, tbarbugli, trcarden, vivanov, vstinner |
| Date |
2015年07月05日.19:04:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1436123048.28.0.195723169486.issue23517@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|