[Numpy-discussion] Dates and times and Datetime64 (again)
chris.barker at noaa.gov
Tue Apr 1 12:10:34 EDT 2014
On Mon, Mar 31, 2014 at 7:19 PM, Nathaniel Smith <njs at pobox.com> wrote:
> > The difference is that datetime.datetime doesn't provide any iso string
> Sure it does. datetime.strptime, with the %z modifier in particular.
that's not ISO parsing, that's parsing according to a user-defined format
string, which can be used for ISO parsing, but the user is in control of
how that's done. And I see this:
"For a naive object, the %z and %Z format codes are replaced by empty
though I'm not entirely sure what that means -- probably only for writing.
> The use case I'm imagining is for folks with ISO strings with a Z on the
> end -- they'll need to deal with pre-parsing the strings to strip off the
> Z, when it wouldn't change the result.
> > Maybe this is an argument for "UTC always" rather than "naive"?
> Probably it is, but that approach seems a lot harder to extend to proper
> tz support later, plus being more likely to cause trouble for pandas's
> proper tz support now.
I was originally advocating for naive to begin with ;-) Someone else pushed
for UTC -- I thought it was you! (but I guess not)
It seems this committee of two has come to a consensus on naive -- and
you're probably right, raise an exception if there is a time zone specifier.
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion