[Numpy-discussion] Dates and times and Datetime64 (again)
Alexander Belopolsky
ndarray at mac.com
Thu Mar 20 21:11:25 EDT 2014
On Thu, Mar 20, 2014 at 9:39 AM, Sankarshan Mudkavi
<smudkavi at uwaterloo.ca>wrote:
> A naive datetime64 would be unable to handle this, and would either have
> to ignore the tzinfo or would have to throw up an exception.
This is not true. Python's own datetime has no problem handling this:
>>> t1 = datetime(2000,1,1,12)
>>> t2 = datetime(2000,1,1,12,tzinfo=timezone.utc)
>>> print(t1)
2000-01-01 12:00:00
>>> print(t2)
2000-01-01 12:00:00+00:00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140320/a527432c/attachment.html>
More information about the NumPy-Discussion
mailing list