This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients Alexander.Belopolsky, barry, belopolsky, djc, lemburg
Date 2012-06-04.15:45:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338824740.64.0.750076471873.issue14908@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-06-04 15:45:40belopolskysetrecipients: + belopolsky, lemburg, barry, djc, Alexander.Belopolsky
2012-06-04 15:45:40belopolskysetmessageid: <1338824740.64.0.750076471873.issue14908@psf.upfronthosting.co.za>
2012-06-04 15:45:39belopolskylinkissue14908 messages
2012-06-04 15:45:39belopolskycreate