Jump to content

Date() function always output +1 hour


everisk

Recommended Posts

Hi,

 

I have a problem when I use a simple date function to print date and time, the time part is always +1 hour.

 

For example,

Current time is 2008-04-04 13:49:42

Date function prints 2008-04-04 14:49:42

 

I check that the server time is correct as well as the time zone. Any idea? I'm just puzzled!

 

Thanks a lot.

Link to comment
https://forums.phpfreaks.com/topic/99499-date-function-always-output-1-hour/
Share on other sites

Either the time zone that php is using is not correct or the DST (daylight savings time) changed in the time zone and php is not using an updated database. See the Note: at this link for how you to update the time zone database -  http://us2.php.net/manual/en/timezones.php

 

If this is not your server and your host is unwilling or unable to update the database, you will need to select a time zone that gives the correct results.

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.