Comment 19 for bug 143784

Revision history for this message
Tres Seaver (tseaver) wrote :

> from here:
> http://en.wikipedia.org/wiki/ISO_8601#Combined_representations
> the whitespace is allowed to separate date and time

First, wikipedia is not authoritative against the spec, which I
cited below.

Second, it happens to be correct here, where it says:

  The date and time representations may sometimes appear in
  proximity, separated by a space or other characters, in which
  case they occupy two separate fields in a data system, rather
  than a single combined representation.

In fact, the only datetime format it shows it describes as
'<date>T<time>'.

> bacarter, eikenberry,
>
> I found out that the method __parse_iso8601 sets the TimeZone to GMT+0
> when a timezone is not given with the time. This is not allowed in
> ISO8601. In the case when a timezone is not given local timezone should
> be used.

Again, the wikipedia page you cite doesn't support that; it says:

  If no time zone information is given with a time, the time zone is
  assumed to be in some conventional local timezone. While it may be
  safe to assume a local zone when used between two people in the same
  area, it is ambiguous when used in communication between multiple
  timezones. It is usually preferable to indicate a time zone using the
  standard’s notation.

The "some conventional local timezone" makes the choice of zone an
implmentation detail: in Zope's case, we chose UTC.