sylvest Posted September 18, 2008 Posted September 18, 2008 Hi, When I record events in my database, I'd like to store them as GMT, so it doesn't matter where the server is, and I can correct them when presenting them to the user for the timezone he's in. I thought I could do this using the PHP function gmmktime() but this is returning the wrong time - it's 4 hours behind GMT, which sounds like the local time at the server if this is in Eastern US. How do I get the current time in GMT? Or alternatively, how do I discover (dynamically) the time zone of the server (correcting for DST) so I can do the correction myself? Thanks - Rowan Quote
TCH-Bruce Posted September 18, 2008 Posted September 18, 2008 The servers are all set to Eastern time I believe. We are currently under daylight savings. It is GMT -5. Sorry, I don't know how to program for it. Quote
carbonize Posted September 26, 2008 Posted September 26, 2008 Have a look at http://uk2.php.net/manual/en/function.date...imezone-set.php Quote
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.