KevinM1 Posted December 13, 2007 Share Posted December 13, 2007 I have a script that allows members to post upcoming events. The only problem is that, since the script is hosted on one of GoDaddy's shared host servers, the timezone isn't correct. The site shows events on the Eastern side of the US, so the correct timezone should be EST. GoDaddy's server is in MST, so all events are shown taking place an hour earlier than they should, with the wrong timezone abbreviation as well. This has caused people to show up too early for some events, as they're confused about when things are actually taking place. Here's the rub: this script is primarily a 3rd party CMS that I didn't create myself. I have tweaked some of the event registration portion, but not the method with which it saves event dates and times. These events' times are saved in a European format in the database: yyyy-mm-dd hh:mm:ss. When other members register for these events, emails are sent to both the person registering and the site admin. To transform the date into something we Americans are used to, I retrieve the event time from the database and run it through date("m-d-Y h:i:s T", $eventTimestamp). The problem, like I said before, is that since GoDaddy's server is in MST, that's what the 'T' flag in the date() function displays. Is there a simple way for me to set the timezone as +2 for it to display EST rather than MST? I know I could always just remove the 'T' flag and append 'EST' to the string, but I'm curious to see if there's a way to do it within the function itself. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.