I am completely new to php and am wondering how I could go about converting this string :
Tue Jan 17 09:17:15 CST 2012
into a format that would fit into a MySQL datetime format (24 hour) of
01-17-2009 09:17:15
I have found the MySQL function FROM_UNIXTIME() that is said to convert from a PHP Timestamp to MySQL DateTime. My problem is getting that original string to the correct PHP Timestamp format.
A quick try:
outputs:
2012-01-17 16:17:15The time difference comes from the timezone. My server is on UTC+1 and CST is UTC-6