Home › Forums › Back End › Timezone Math › Re: Timezone Math
February 25, 2012 at 7:24 am
#97423
karlpcrowley
Participant
Your code doesn’t know it’s a time
I don’t have access to run PHP at the moment but try this:
//3600 = 1 hour
$time = 18*3600; // 18 for 6PM
$a = $time + 36000; // +10 hours
$b = $time - 14400; // -4 Hours
echo "+10 hours: ";
print date("G:i",$a);
echo " -4 hours: ";
print date("G:i",$b);
?>