[whatwg] 'datetime-local' and 'datetime' comments
ian at hixie.ch
Mon Nov 19 22:17:17 PST 2012
On Mon, 12 Nov 2012, Mounir Lamouri wrote:
> We've been working on implementing date and time input types attributes
> at Mozilla this summer and we found out that 'datetime-local' and
> 'datetime' have a quite odd behaviour.
> 'date' and 'time' are both timezone agnostic types: you just set a time
> and date and we assume that it is relative to something. So, it seems
> somewhat natural to assume that 'datetime' would be simply those types
> added to each other. Instead of that, 'datetime' has a notion of
> timezone and 'datetime-local' is the timezone agnostic type.
> In addition of being more intuitive, it seems that a huge majority of
> date/time usage are timezone agnostics because, usually, the timezone is
> implicit. For example, booking flight/train tickets. There is however
> some use cases I can think of, like scheduling a meeting, where,
> sometimes, you might want to mess with timezones. But those are quite
Actually I think the ones that are rare are the agnostic ones -- and
they're agnostic just because the site already has other information, such
as the geographical location at which the time is relevant (as in the case
of plane tickets) or because they follow the user's time zone regardless
(as in some cases for alarm clocks).
However, if you think it would help to rename "datetime-local" to
"datetime", and rename the old "datetime" to "datetime-global" or some
such, and if browser vendors are willing to make that change, then I guess
we can do that. Anyone from Opera have any input on that, in particular?
FWIW, the UI I'd expect for today's datetime, maybe renamed to
"datetime-global", would be a date/time picker that works just like the
one without a timezone, except that it then converts the time you give
into UTC. So far example, I'm in the PST time zone, so if I said November
19th, 5pm, it would send that as November 20th, 1am UTC.
The idea is to be able to get a precise time from the user without having
to worry about what time zone the user's in, and without the user having
to worry about what time zone other users are in. This would be very
useful for scheduling global events, e.g. when a hangout is to happen, or
when a game is to start, etc. I really don't think this is a rare thing.
In fact I think mostly it's the one to encourage people to use, which is
why it's called "datetime" currently, with the one without timezones,
which I think will overall be rarer, having the longer name.
I agree that existing UIs are unfortunate, but they should be fixed. It
would be unfortunate to push people towards the timezone-less control just
because we screwed up the UI and then renamed the type in shame.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg