Message162267
Barry,
Did you review the long discussion under issue 2736? Specifically, please note the part about mxDateTime, ticks() and gmticks(). I am -0 on adding ticks() and gmticks() and as far as I can tell no one has implemented these methods for datetime without introducing some subtle bugs.
I also suspect that those who ask for a timestamp() method expect that it will do more than
EPOCH = datetime(1970, 1, 1)
def timestamp(t):
return (t - EPOCH).total_seconds()
For example, account for leap seconds or magically guess the DST offset. If we introduce a method that implements the code above, we have to prepare to explain why it does not do those things.
If instead we introduce a shortcut for time.mktime(t.timetuple()), we will have to deal with the fact that mktime() behaves differently on different systems. |
|
Date |
User |
Action |
Args |
2012-06-04 15:45:40 | belopolsky | set | recipients:
+ belopolsky, lemburg, barry, djc, Alexander.Belopolsky |
2012-06-04 15:45:40 | belopolsky | set | messageid: <1338824740.64.0.750076471873.issue14908@psf.upfronthosting.co.za> |
2012-06-04 15:45:39 | belopolsky | link | issue14908 messages |
2012-06-04 15:45:39 | belopolsky | create | |
|