Closed keul closed 10 years ago
I just checked on DateTime-3.0.3 (with Plone 4.3.2). I found the same result. (My local time is JST (GMT+9)
$ ./bin/zopepy
from DateTime import DateTime DateTime('2014-03-17') DateTime('2014/03/17 00:00:00 GMT+0') DateTime('2014/03/17') DateTime('2014/03/17 00:00:00 GMT+9')
The choice to using UTC when parsing an ISO-conformant datetime is deliberate. I would say that the docs should point this out, with an example, in the section on the DateTime constructor.
ISO 8601 has special syntax for UTC: you append the letter Z
to the end to the timestamp. Timestamps not ending in Z
are assumed to be in local time.
Some countries have a national standard for expressing time that happens to match ISO-8859-1. Zope's decision to treat them as UTC baffles me. (I stopped using Zope 2 a while ago, so I don't really care; I can just add this to my mental list of reasons why nobody should be using Zope 2).
Issue found on DateTime 3.0 and also 2.12:
It seems that when using the
-
separator the date is always created in GMT +0 while using/
returns the right GMT.