[eluser]cyberjunkie[/eluser]
I'm simply trying to display my local time in Miami using the following code:
Code:
date_default_timezone_set('America/New_York'); //is added in library
$timestamp = time();
$timezone = 'UM5'; //(UTC - 5:00) Eastern Time, Bogota, Lima, Quito
$daylight_saving = TRUE;
$miamitime = gmt_to_local($timestamp, $timezone, $daylight_saving);
echo unix_to_human($miamitime); // U.S. time, no seconds
The time I'm getting is 1 day ahead and 1 hour behind the actual local time. I'm testing the site on local server using WAMP. It looks to me like I'm setting everything right.. I'm not sure what is causing this. Please advise how to correctly display my local time.