I have this string 2012-06-27 16:17:06 and I want to convert it to GMT format. How can I do that?
2012-06-27 16:17:06
Thanks a lot.
Use gmdate(). Convert your current date format to UNIX timestamp by using strtotime and then use gmdate($format, $timestamp);
strtotime
gmdate($format, $timestamp);
Is there a PHP function that returns the date and time in the same format as the MySQL function NOW()? I know how to do it using date(), but I am asking if there is a function only for this. …
How to calculate minute difference between two date-times in PHP?
time() is in seconds - is there one in milliseconds?