[Numpy-discussion] Dates and times and Datetime64 (again)

Alexander Belopolsky ndarray at mac.com
Tue Apr 1 12:18:21 EDT 2014


On Tue, Apr 1, 2014 at 12:10 PM, Chris Barker <chris.barker at noaa.gov> wrote:

> "For a naive object, the %z and %Z format codes are replaced by empty
> strings."
>
>  though I'm not entirely sure what that means -- probably only for writing.
>

That's right:

>>> from datetime import *
>>> datetime.now().strftime('%z')
''
>>> datetime.now(timezone.utc).strftime('%z')
'+0000'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140401/33eb7db3/attachment.html>


More information about the NumPy-Discussion mailing list