[Javascript] Q on TimeZone
Hassan Schroeder
hassan at webtuitive.com
Tue Sep 11 18:32:43 CDT 2001
Walter Torres wrote:
> I live in Chicago, it is minus 6 hours from GMT.
>
> But this...
>
> var mine = new Date();
> var TZmine = mine.getTimezoneOffset();
>
> returns
>
> 300 // which is 5 hours
>
> Shouldn't this be negative 6?
nope, the TimezoneOffset is the difference in minutes between
local time and GMT; for you, GMT is "later" and therefore its
value is a larger (positive) number of minutes.
> Also, I need to create a new Date and define a GMT offset.
Not sure I understand "define a GMT offset" ... clarify?
--
H*
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
-- creating dynamic Web sites and applications since 1994 --
More information about the Javascript
mailing list