$timeposted = \"7:10pm\";
This value is currently Canada time (quebec). I\'m trying to find a way to convert it to France\'s time. How can i do that ?
This is my function that take time from a mysql db (which I've stored entirely in UTC) and converts to a new timezone and formats it simply.
function changetimefromUTC($time, $timezone) {
$changetime = new DateTime($time, new DateTimeZone('UTC'));
$changetime->setTimezone(new DateTimeZone($timezone));
return $changetime->format('m/d/y h:i a');
}
This is a list of supported timezones http://us1.php.net/manual/en/timezones.php