![]() |
Get my local time - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Get my local time (/showthread.php?tid=52242) |
Get my local time - El Forum - 06-02-2012 [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 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. Get my local time - El Forum - 06-03-2012 [eluser]rthut[/eluser] Try: Code: date_default_timezone_set('America/New_York'); Get my local time - El Forum - 06-03-2012 [eluser]Learn CodeIgniter[/eluser] application/config/config.php Try setting this Code: $config['time_reference'] = 'gmt'; // instead of 'local' |