[Numpy-discussion] datetime64 1970 issue

Benjamin Root ben.root at ou.edu
Wed Apr 17 21:05:58 EDT 2013


On Wed, Apr 17, 2013 at 7:10 PM, Chris Barker - NOAA Federal <
chris.barker at noaa.gov> wrote:

> On Wed, Apr 17, 2013 at 1:09 PM, Bob Nnamtrop <bob.nnamtrop at gmail.com>
> wrote:
> > It would seem that before 1970 the dates do not include the time zone
> > adjustment while after 1970 they do. This is the source of the extra 7
> > hours.
> >
> > In [21]: np.datetime64('1970-01-01 00')
> > Out[21]: numpy.datetime64('1970-01-01T00:00-0700','h')
> >
> > In [22]: np.datetime64('1969-12-31 00')
> > Out[22]: numpy.datetime64('1969-12-31T00:00Z','h')
>
>  In [111]: np.datetime64('1970-01-01 00').view(np.int64)
> Out[111]: 8
>
> indicates that it is doing the input transition differently, as the
> underlying value is wrong for one.
> (another weird note -- I;m in pacific time, which is -7 now, with
> DST....so why the 8?)
>

Aren't we on standard time at Jan 1st?  So, at that date, you would have
been -8.

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130417/a8c7ed2f/attachment.html>


More information about the NumPy-Discussion mailing list