W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

Re: [whatwg] 'datetime-local' and 'datetime' comments

From: Mounir Lamouri <mounir@lamouri.fr>
Date: Wed, 21 Nov 2012 11:31:36 +0000
Message-ID: <50ACBB98.9060803@lamouri.fr>
To: whatwg@lists.whatwg.org
On 20/11/12 08:37, Nicolas Froidure wrote:
> On 20/11/2012 07:17, Ian Hickson wrote:
>> a date/time picker that works just like the
>> one without a timezone, except that it then converts the time you give
>> into UTC.
>>    
> That's exactly the behavior i would like to have. From the server side
> it seems nice.
> 
> The bad is that Javascript Date objects are initialized with local time
> and prints local time (toString
> <https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toString>).
> Web developers could expect the same behavior for date inputs and date
> objects.

Aren't you looking for this:
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toUTCString

--
Mounir
Received on Wednesday, 21 November 2012 12:03:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT