note 45182 deleted from function.time by aidan

From: Date: Sat, 08 Oct 2005 01:05:18 +0000
Subject: note 45182 deleted from function.time by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96626@lists.php.net to get a copy of this message
Note Submitter: rehfeld.us ---- in reply to : flobee at gmx dot net Id just like to caution those who are considering adding enviornment variables to windoes. This can cause a world of trouble. I noticed that adding the enviornment variable *TZ* with the value *GMT* (without the *asteriks of course) will make the javascript Date() object act differently. for example, <script type="text/javascript> var now = new Date(); var hour = now.getHours(); document.write(hour); // outputs the GMT hour, NOT the SYSTEM hour! </script> normally you would expect the output to be the same hour as your system clock, but if you add the TZ env var it will output the time in GMT instead this was using opera 7.5x, i would imagine identical behaviour in all browsers hope this saves someone the headache i just went through

« previous php.notes (#96626) next »