W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

getTimezoneOffse: do what I want it to

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Mon, 21 Apr 2014 15:27:38 -0700
Message-ID: <CABZUbM1cCWxu20nybR=QrUTVba=UCtCsbz6Q5Hwy3L5DruFsTA@mail.gmail.com>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
What is the right way to associate a timezone with a Date object. Date
object does not keep timezone information.

var d = new Date("2014-05-01T00:00+08:00");
d.getTimezoneOffset() / 60

7.

If I want Shanghai timezone, I would have to create a decorator for
the Date. I wish there was some way to deal with that in EcmaScript.
When did this come up last? Sorry I probably missed it. Any threads I
should read up on?

Thanks,
-- 
Garrett
@xkit
ChordCycles.com
garretts.github.io
Received on Monday, 21 April 2014 22:28:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC