everisk Posted April 4, 2008 Share Posted April 4, 2008 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. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted April 4, 2008 Share Posted April 4, 2008 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. Quote Link to comment Share on other sites More sharing options...
everisk Posted April 7, 2008 Author Share Posted April 7, 2008 Thanks. From your comment I figured out a way by setting Default timezone in php.ini. 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.