Alright so I have a datetime string in PHP in the Y-m-d H:i:s format. For exampe:
'2013-07-01 00:04:37'
In addition I have a timezone string like:
'-05:00'
I want to convert these two strings into an integer (unix time) and then store it in a MySQL database. How would you do so?
I know that given a string you can get the unix time as follows in PHP:
date_create('2013-07-01 00:04:37')->getTimestamp();
However how would you adjust it so that it accounts for the correct timezone? Also how do you store a unix timestamp in MySQL from PHP?
CONVERT_TZ()mysql function?