[whatwg] Submitting datetime values should more clearly specify required timezone syntax

Lachlan Hunt lachlan.hunt at lachy.id.au
Wed Mar 30 08:39:56 PDT 2011


Hi,
   The spec states for submission of datetime controls that the value 
must be expressed in the UTC time-zone.  It's not clear whether this 
requires the formatted string to state the timezone as an uppercase "Z" 
or "+00:00", or whether either is acceptable.

Most of the examples illustrate the use of the "Z", but elsewhere in the 
spec, following the definition of the valid global date and time string, 
it recommends against using the Z.

   "The *best representation of the global date and time string* datetime
    is the valid global date and time string representing datetime, with
    the valid time string component being given in its shortest possible
    form, with the last character of the string not being a U+005A LATIN
    CAPITAL LETTER Z character (Z), even if the time zone is UTC, and
    with a U+002B PLUS SIGN character (+) representing the sign of the
    time-zone offset when the time zone is UTC."

http://whatwg.org/C#best-representation-of-the-global-date-and-time-string

(Note that the spec defines this "best representation..." term, but 
never actually uses it anywhere. It's not clear what the purpose of that 
definition is.)

Opera has always submitted the value with a "Z" and not +00:00, and we 
would prefer not to change this for backwards compatibility and ease of 
parsing on the server side.  The spec should define in the value 
sanitization algorithm for the date and time time state, to express the 
UTC time-zone using a "Z".

http://whatwg.org/C#date-and-time-state

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/


More information about the whatwg mailing list