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

On Wed, 30 Mar 2011, Lachlan Hunt wrote:
>
> 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"

I couldn't find any examples of the output of this; did I miss some?


> 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.)

It's used in the microdata to Atom conversion algorithm.


> 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".

Done.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 15 June 2011 15:00:37 UTC