Page 1 of 1

Converting a time go GMT Timestamp

Posted: Fri Oct 27, 2006 1:26 pm
by dwessell
Hey all.. I have a date/time in the format of "10-03-2006 9:00 am Eastern".. Can someone point me in the direction of how to convert that to a GMT Timestamp?

Thanks
David

Posted: Fri Oct 27, 2006 1:36 pm
by feyd
That's a fairly odd date-time format, but shouldn't be too difficult to handle. strtotime() may do most of the work, but it may get the date wrong at times and the time offset will likely be off too. Once you have it as a localized unix timestamp, you can add date('Z') to it.