This is a static archive of the previous Open Grid Forum Redmine content management system saved from host redmine.ogf.org file /boards/15/topics/30?r=31 at Thu, 03 Nov 2022 23:30:52 GMT dateTime I format unable to determine correct timezone format for output of UTC dateTime - Public Comments Archive - Open Grid Forum

dateTime I format unable to determine correct timezone format for output of UTC dateTime

Added by Alex Wood about 9 years ago

In section 13.11.1 the description of the I calendar pattern format is as follows:

The 'I' symbol must not be used with any other symbol with the exception of 'escape for text'. It
represents calendar formats that match those defined in the restricted profile of the ISO 8601
standard proposed by the W3C at http://www.w3.org/TR/NOTE-datetime. The formats are
referred to as 'granularities'.
• xs:dateTime. When parsing, the data must match one of the granularities. When
unparsing, the fullest granularity is used.

Referring to http://www.w3.org/TR/NOTE-datetime give us the fullest granularity for a dateTime of:

YYYY-MM-DDThh:mm:ss.sTZD

With the description of TZD as:

TZD  = time zone designator (Z or +hh:mm or -hh:mm)

...
This profile defines two ways of handling time zone offsets:

    Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z").
    Times are expressed in local time, together with a time zone offset in hours and minutes. A time zone offset of "+hh:mm" indicates that the date/time uses a local time zone which is "hh" hours and "mm" minutes ahead of UTC. A time zone offset of "-hh:mm" indicates that the date/time uses a local time zone which is "hh" hours and "mm" minutes behind UTC.

So it is quite clear that I should support both the Z timezone designator and the +hh:mm format. But it is not clear which should be used on output for a datetime in UTC.


Replies (6)

RE: dateTime I format unable to determine correct timezone format for output of UTC dateTime - Added by Alex Wood about 9 years ago

If we look at ICU to determine what behavior we can get from there if we require support for the 'Z' UTC timezone designator for a zero timezone offset. Then we find we must use the timezone pattern XXX. The behavior of XXX is to output the timezone as 'Z' if the timezone offset is 0. Although it appears tolerant of +00:00 on input.

RE: dateTime I format unable to determine correct timezone format for output of UTC dateTime - Added by Michael Beckerle about 9 years ago

Resolved on 2013-09-24 DFDL Workgroup call - output for I format will use numeric representation "+00:00" for UTC.

(1-6/6)

This is a static archive of the previous Open Grid Forum Redmine content management system saved from host redmine.ogf.org file /boards/15/topics/30?r=31 at Thu, 03 Nov 2022 23:30:52 GMT