Corona4456 Posted May 4, 2006 Share Posted May 4, 2006 I searched around for an answer but I wasn't able to find one so if you can point me to a solution that would be great or if you can solve this problem then that would be great too. Ok, here is my problem. Well first thing is first here are the webserver specs:Windows XP Professional w/ SP2PHP 5.1.2MySQL 5.0.18Apache 2.0.55Now on to the problem. I'm trying to use the date function. and when I do:[code]<?php echo date("Y-m-d H:i:s T I");?>[/code]I get an hour time difference from my server. My server is set to use DST but ever since the time change in April occured the PHP date function has been returning the time 1 hour behind. For example, when I run it I get:2006-05-03 23:37:31 MST 0When I expect:2006-05-04 0:37:31 MDT 1It's not a HUGE problem but something I would definitely like to get fixed (if possible). I've tried setting the time zone by editing the php.ini file but it didn't seem to do anything. So if anyone has a solution to this problem or if you need more info please let me know. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
tjhilder Posted May 4, 2006 Share Posted May 4, 2006 [code]<?php echo date("Y-m-d H:i:s T I", time() + 60*60));?>[/code]60*60 = 1 hourmore further explanation can be found at php.net --> [a href=\"http://www.php.net/manual/en/function.time.php\" target=\"_blank\"]here[/a] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.