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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.