mikeylikesit Posted February 21, 2012 Share Posted February 21, 2012 Hello, I am hoping someone may be able to help me out with a strange issue that i cannot seem to resolve. I have a server that is running CentOS 6.2 with Virtualmin as the control panel. It is running PHP v5.3.3. I am haing an issue where PHP is apparently translating the UNIX timestamp as 1 hour earlier than the actual server time. (The server has the correct time and the date command does output the correct time and timezone.) I am having issues with countdown timers and other items that rely on the date. (This is causing errors on the sites...) After confirming the server's time is correct, I added the below line to my footer page in a site on the server and when viewing the page source it gives me a timestamp of one hour earlier than the actual system time.. <!-- SERVER's UNIX TIMESTAMP: <?php echo time(); ?> --> I only have two domains on this box so i then went in and edited the following files: (commented out all the date.timezone lines) to see if this was the issue.. /etc/php.ini /home/domain1/etc/php.ini /home/domain1/etc/php5/php.ini /home/domain2/etc/php.ini /home/domain2/etc/php5/php.ini Then restarted apache, and i am still getting the same thing... 1hour off... from the php output from above... So, I am at a loss on what to do to correct this now. Any help here is really appreciated! Thanks alot Quote Link to comment https://forums.phpfreaks.com/topic/257421-php-translation-of-unix-timestamp-1-hour-off-unable-to-find-root-cause/ Share on other sites More sharing options...
psynor Posted March 27, 2012 Share Posted March 27, 2012 What's the value of you date.timezone in php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/257421-php-translation-of-unix-timestamp-1-hour-off-unable-to-find-root-cause/#findComment-1331601 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.