[Numpy-discussion] Making datetime64 timezone naive

Alexander Belopolsky ndarray at mac.com
Fri Oct 16 13:19:58 EDT 2015


On Tue, Oct 13, 2015 at 6:48 PM, Chris Barker <chris.barker at noaa.gov> wrote:

> And because we probably want fast absolute delta computation, when we add
> timezones, we'll probably want to store the datetime in UTC, and apply the
> timezone on I/O.
>
> Alexander: Am I right that we don't need the "fold" bit in this case?
> You'd still need it when specifying a time in a timezone with folds.. --
> but again, only on I/O


Since Guido hates leap seconds, PEP 495 is silent on this issue, but
strictly speaking UTC leap seconds are "folds."   AFAICT, a strictly POSIX
system must repeat the same value of time_t when a leap second is
inserted.  While datetime will never extend the second field to allow
second=60, with PEP 495, it is now possible to represent 23:59:60 as
 23:59:59/fold=1.

Apart from leap seconds, there is no need to use "fold" on datetimes that
represent time in UTC or any timezone at a fixed offset from utc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151016/914b5913/attachment.html>


More information about the NumPy-Discussion mailing list