Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:

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.

----------

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

Reply via email to