Discussion Locked

Javascript time

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do I apply the getTimeZoneOffset() function ?

systime = new Date();
systime.getTimeZoneOffset();

does not work. debugger returns a message saying the function is not recognised.

I have the same problem with

toGMTString() and toLocalString()

6 replies

by compsci

It's case sensitive...

systime = new Date();
alert(systime.getTimezoneOffset());

The preceding script with a lowercase 'z' returns the integer '360'.

Hope that this helps.

by vcsekhar007

Try the following (copy and paste in ur html file)
---------------------

------------------Sekhar----------------------

by verewolf

Thanks all, I got the answer from another source. The text I referred to has misprinted the function calls.

This discussion is closed to new replies.