I'm pulling records from a Postgres DB and then saving them to a MySQL DB. I'm fairly new to Postgres and I'm having a difficult time with these timestamps. How can I convert these timestamp without time zone values to a PHP datetime (Central Time)?
I'm pulling records from a Postgres DB and then saving them to a MySQL DB. I'm fairly new to Postgres and I'm having a difficult time with these timestamps. How can I convert these timestamp without time zone values to a PHP datetime (Central Time)?
The DateTime constructor takes a parameter for the timezone. If the constructor can't parse the format you're getting from Postgres, the DateTime class also has a static factory method, DateTime::createFromFormat, in which you can specify the format string as the first parameter.