note 45182 added to function.time

From: Date: Sat, 28 Aug 2004 09:37:50 +0000
Subject: note 45182 added to function.time
Groups: php.notes 
Request: Send a blank email to php-notes+get-75492@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.time.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45182 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45182&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45182&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75492) next »