Jump to content

PHP translation of UNIX timestamp 1 hour off - Unable to find root cause


Recommended Posts

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

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.