JRS: In article <41************ ***@agricoreuni ted.com>, dated Tue, 2
Nov 2004 21:41:09, seen in news:comp.lang. javascript, Grant Wagner
<gw*****@agrico reunited.com> posted :
Loaded into IE 6.0.2800 (pre Windows XP Service Pack 2) and IE 6.0.2900 (Windows
XP Service Pack 2), as well as Mozilla Firefox 0.10.1 (1.0PR) all display "6"
(I'm currently in CDT - Central Daylight Savings Time). So it appears to be
working correctly. You can streamline the JavaScript a bit by making it:
<script type=\"text/javascript\">
window.locatio n.href=\"$_SERV ER[PHP_SELF]?tz=\" + ((new
Date()).getTim ezoneOffset() / 60);
</script>
But that shouldn't affect the result.
I see possible difficulties if the code is executed with settings for
Newfoundland, India, etc., where getTimezoneOffs et()/60 is not integer.
And, indeed, where it is negative.
--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demo n.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demo n.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.