$timezone = "-5";
$timestamp = gmmktime();
$new_timestamp = $timestamp + ($timezone * 60 * 60);
$formatted_date = date('m/d/Y H:i', $new_timestamp);
echo $formatted_date;
echo "<br>" . gmmktime() . "<br>";
echo date('m/d/Y H:i', $timestamp);
Result:
04/24/2005 03:20
1114348833
04/24/2005 08:20
It is currently 2:20pm EST so why would it say it is 8am in GMT? Is gmmktime() the best way tocome up with the current GMT time?
Also do I have to adjust for daylight savings? I am new to time() and date() functions.
Thanks in advanced.