I am pulling a feed from Google Calendar. It has the event start time in this format:
StartDate: 2011-06-25T18:00:00.000-05:00
I understand that the -05:00 is the timezone offset. I need the above to get put into the mySQL database in GMT time. I was just reading about date() and gmdate() but I'm afraid I'm pretty new at this and I don't seem to be getting the results I need.
Right now the above code ends up being this in my datetime colum in mySQL:
2011-06-25 18:00:00
I need the above to be:
2011-06-25 23:00:00
But I need a dynamic way to do this so any user with a different timezone will get the correct results-IE: I need the function to be smart enough to read the timezone offset and make the needed changes regardless of the offset. I'm hoping there is a PHP function that does this already?
Thanks for any help!