Monthly Archives: November 2011

Convert a date and time to UTC

      No Comments on Convert a date and time to UTC

/** Converts a date and time to UTC * /param date The date in the format dd/mm/yyyy * /param time The time in the format HH/mm/ss * /return utc */    function utc($inputDate, $inputTime) { $pieces = explode(“/”, $inputDate); $dateus = $pieces[2].”-“.$pieces[1].”-“.$pieces[0]; $stringtime = “$dateus $inputTime”; return strtotime($stringtime); }