epic_era1 Posted April 7, 2008 Share Posted April 7, 2008 Hello, I'm having a bit of problem with the date("H:i", time()); , i'ts returning one hour ahead of the real time and I can't figureout why? any help is most appreciated.. thanks in advance Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 8, 2008 Share Posted April 8, 2008 date("H:i") is going to return the value of time on the server which is probably not in your time zone. The real time is ... variable. Quote Link to comment Share on other sites More sharing options...
kevin7 Posted April 8, 2008 Share Posted April 8, 2008 correct, date() function will returnt the server time instead of your local computer time, you can add or minus to make it right. Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 8, 2008 Share Posted April 8, 2008 correct, date() function will returnt the server time instead of your local computer time, you can add or minus to make it right. Gee, thanks for the confirmation Or was it just a post count booster? Quote Link to comment Share on other sites More sharing options...
kevin7 Posted April 8, 2008 Share Posted April 8, 2008 nah, it happed to me once, the server was located in US, and the competition was located in Australia, I miscalculated the time different, the competition closed earlier one hour.. oops... so, now im very becareful with the timezone. Quote Link to comment Share on other sites More sharing options...
epic_era1 Posted April 8, 2008 Author Share Posted April 8, 2008 would this happen if the host is on my own computer? Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 8, 2008 Share Posted April 8, 2008 It shouldn't Quote Link to comment Share on other sites More sharing options...
moon 111 Posted April 8, 2008 Share Posted April 8, 2008 You can use date_default_timezone_set to set the default time zone. 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.