I've got a newb question about Daylight Savings Time (DST). First of
all here is some server info:
Apache 1.3.28
PHP 4.3.6
MySQL 3.23.49
Time is set to GMT
My goal is to be able to accurately record website visits according to
my local time (U.S. Central) every day of the year, no matter if I am
in DST or not. I need a full datetime set of information (hour, min,
second, etc).
I have devised this line of code...
$date=date("Y:m :dH:i:s",time-18000);
....but it does not help me when DST changes for me, as GMT does not
observe DST.
Next I tried this:
echo("server time is: " . date("H:i:s") . "<br>\n");
putenv("TZ=US/Central");
echo("new server time is: " . date("H:i:s") . "<br>\n");
And got these results:
server time is: 17:46:44
new server time is: 17:46:44
Apparently, the server does not allow me to change my timezone to
Central time (because the resulting times are the same). The
application I am developing relies heavily on *accurate* time
information. Anyone have any ideas how I can get this DST issue
figured out?
all here is some server info:
Apache 1.3.28
PHP 4.3.6
MySQL 3.23.49
Time is set to GMT
My goal is to be able to accurately record website visits according to
my local time (U.S. Central) every day of the year, no matter if I am
in DST or not. I need a full datetime set of information (hour, min,
second, etc).
I have devised this line of code...
$date=date("Y:m :dH:i:s",time-18000);
....but it does not help me when DST changes for me, as GMT does not
observe DST.
Next I tried this:
echo("server time is: " . date("H:i:s") . "<br>\n");
putenv("TZ=US/Central");
echo("new server time is: " . date("H:i:s") . "<br>\n");
And got these results:
server time is: 17:46:44
new server time is: 17:46:44
Apparently, the server does not allow me to change my timezone to
Central time (because the resulting times are the same). The
application I am developing relies heavily on *accurate* time
information. Anyone have any ideas how I can get this DST issue
figured out?
Comment