[Datetime-SIG] Drop datetime's offset restrictions?

Carl Meyer carl at oddbird.net
Wed Aug 12 22:51:01 CEST 2015


On 08/12/2015 02:44 PM, Chris Barker wrote:
> The problem I see with ISO 8601 is that (AFAICT) there is no way to
> specify a time zone -- only a UTC offset.
> and offsets are not unique.
> So if someone wants to create a datetime object from an ISO 8601 string,
> they have two options:
>  * The string does not contain an offset -- they should get a naive datetime
>  * The string does contain an offset -- they have to get a datetime with
> a UTC tzinfo object, with the offset having been applied.

No, they should get a datetime object matching the ISO datetime they
passed in, with a FixedOffset tzinfo instance attached to it.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150812/008f2022/attachment.sig>

More information about the Datetime-SIG mailing list