Link to home
Start Free TrialLog in
Avatar of Paul Konstanski
Paul KonstanskiFlag for United States of America

asked on

Convert a GMT TimeStamp to Local Time using PHP

I am doing an API call that gives me a type of timestamp in GMT.   For example, it comes in as 2016-11-09T12:18:15+00:00.

I want to convert this to the time of the server running the PHP program which is a GMT -5 and express it YYYY-MM-DD HH:mm:ss

So for the above time how do I convert 2016-11-09T12:18:15+00:00 to 2016-11-09 07:15:15.

Thanks.
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Avatar of Paul Konstanski

ASKER

Sorry I wasn't more clear. I don't want to set the time AS my local server time, I want to convert the API read time to my local time.

This API call happens in batch mode, so it reads four hours worth of data so I can't used the current time. I need to convert the time that comes to me as the GMT format into what the equivalent time was when the record was created.
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial