Jump to content

Recommended Posts

Posted

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

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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