[
Bloke.com
|| Linux
|| JavaScript
|| Java
|| Volleyball
|| Link Me
]
Free: [ Guestbook || MessageBot || Plugins || Counter || AusPrices || Advertise ] |
![]() |
ServerClock()
Local Time | |
---|---|
California (-480) | |
New Jersey (-300) | |
Slovakia(120) | |
Townsville, Australia (600) | |
Greenwich Mean Time - GMT (0) |
They changed the definition of getTimezoneOffset() in 3.0, to be the reverse!!! Well here is the magic (urrgh)! [thanks to zoomer for noting the clock was wrong in 3.0]. The code included here works for netscape 1.1 and above (last checked at netscape 4.5.1) and I.E for the same times..
d = new Date(); if (navigator.appVersion.substring(0,3) == "2.0") realOffset = -d.getTimezoneOffset(); else realOffset = d.getTimezoneOffset();
<script language="javascript"> ServerClock(-240); </script>
Got JavaScript questions? Maybe my JavaScript Board has the answers?