<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 7:45 PM, Ondřej Čertík <span dir="ltr"><<a href="mailto:ondrej.certik@gmail.com" target="_blank">ondrej.certik@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, Apr 16, 2013 at 4:55 PM, Bob Nnamtrop <<a href="mailto:bob.nnamtrop@gmail.com">bob.nnamtrop@gmail.com</a>> wrote:<br>


> I am curious if others have noticed an issue with datetime64 at the<br>
> beginning of 1970. First:<br>
><br>
> In [144]: (np.datetime64('1970-01-01') - np.datetime64('1969-12-31'))<br>
> Out[144]: numpy.timedelta64(1,'D')<br>
><br>
> OK this look fine, they are one day apart. But look at this:<br>
><br>
> In [145]: (np.datetime64('1970-01-01 00') - np.datetime64('1969-12-31 00'))<br>
> Out[145]: numpy.timedelta64(31,'h')<br>
><br>
> Hmmm, seems like there are 7 extra hours? Am I missing something? I don't<br>
> see this at any other year. This discontinuity makes it hard to use the<br>
> datetime64 object without special adjustment in ones code. I assume this a<br>
> bug?<br>
<br>
</div>Indeed, this looks like a bug, I can reproduce it on linux as well:<br>
<br>
In [1]: import numpy as np<br>
<br>
In [2]: np.datetime64('1970-01-01') - np.datetime64('1969-12-31')<br>
Out[2]: numpy.timedelta64(1,'D')<br>
<br>
In [3]: np.datetime64('1970-01-01 00') - np.datetime64('1969-12-31 00')<br>
Out[3]: numpy.timedelta64(31,'h')<br>
<br></blockquote><div><br></div><div>Maybe, maybe not... were you alive then?  For all we know, Charles and co. were partying an extra 7 hours every day back then?<br><br></div><div>Just sayin'<br><br></div><div>Ben Root<br>

</div></div></div></div>