On Wednesday, October 25, 2017, Chris Barker <chris.barker@noaa.gov> wrote:
ISO8601 does support timezones.
I might be wrong, but I think many of the third party libraries listed here default to either UTC or timezone-naieve timezones:
Ctrl-F for 'tzinfo=' in the docs really doesn't explain how to just do it with my local time.
Here's an example with a *custom* GMT1 tzinfo subclass:
What would you call the str argument? Does it accept strptime args or only ISO8601? Would all of that string parsing logic be a performance regression from the current constructor? Does it accept None or empty string?
...
Deserializing dates from JSON (without #JSONLD and xsd:dateTime (ISO8601)) types is nasty, regardless (try/except, *custom* schema awareness). And pickle is dangerous.
AFAIU, we should not ever eval(repr(dt: datetime)).
...
Should the date time constructor support nanos= (just like time_ns())?
ENH: Add nanosecond support to the time and datetime constructors
...
The astropy Time class supports a string argument as the first parameter sometimes:
Astropy does support a "year zero".