[issue23574] datetime: support leap seconds

2015-07-31 Thread dlroo

dlroo added the comment:

Is it possible to modify datetime so that the check_time_args function in the 
datetimemodule.c does not error when given a seconds value of greater than 59?  
I was thinking that if the seconds were greater than 59, the seconds are set to 
59 and any extra seconds are kept in a book keeping "attribute" (not a real 
attribute because its C) that is accessible from the Python side?  You would 
have to make the seconds argue passed by reference (thus returning a modified 
second).  Also would want the book keeping value to be zero in nominal 
conditions.
This would do nothing for any of the datetime arithmetic, but that can be 
handled externally.

--

___
Python tracker 
<http://bugs.python.org/issue23574>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23574] datetime: support leap seconds

2015-07-21 Thread dlroo

dlroo added the comment:

If you are using mx.DateTime make certain you do not use the .strftime method.  
If you use .strftime method and have a 60th second in your DateTime object it 
will crash python with no error message.  This occurs because the .strftime 
method is fully inherited from Python's datetime.datetime.

--
nosy: +dlroo
versions: +Python 2.7 -Python 3.5

___
Python tracker 
<http://bugs.python.org/issue23574>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com