<div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none">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. </span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">
<div>In [21]: np.datetime64('1970-01-01 00')</div><div>Out[21]: numpy.datetime64('1970-01-01T00:00-0700','h')</div><div><br></div><div>In [22]: np.datetime64('1969-12-31 00')</div><div>Out[22]: numpy.datetime64('1969-12-31T00:00Z','h')</div>
</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">
I saw the other thread about the time zone issues and I think getting rid of timezones (perhaps unless they are explicitly requested) is the right thing to do.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">
Bob</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 4:55 PM, Bob Nnamtrop <span dir="ltr"><<a href="mailto:bob.nnamtrop@gmail.com" target="_blank">bob.nnamtrop@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 dir="ltr"><div><div><div dir="ltr"><div><div><div><div><div><div><div>I am curious if others have noticed an issue with datetime64 at the 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></div>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></div></div>Hmmm, seems like there are 7 extra hours? Am I missing 
something? I don't see this at any other year. This discontinuity makes it hard to use the datetime64 
object
 without special adjustment in ones code. I assume this a bug?<br><br></div>Thanks,<br>
</div>Bob<br><br></div>ps I'm using the most recent anaconda release on mac os x 10.6.8 which includes numpy 1.7.0.<br><br></div>pss It would be most handy if datetime64 had a constructor of the form np.datetime64(year,month,day,hour,min,sec)
 where these inputs were numpy arrays and the output would have the same
 shape as the input arrays (but be of type datetime64). The hour,min,sec
 would be optional. Scalar inputs would be broadcast to the size of the 
array inputs, etc. Maybe this is a topic for another post.</div></div></div></div>
</blockquote></div><br></div>