![]() |
Codeigniter timezone to php timezone. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Codeigniter timezone to php timezone. (/showthread.php?tid=34858) |
Codeigniter timezone to php timezone. - El Forum - 10-11-2010 [eluser]panos konstantinides[/eluser] Hello, we are using ci's Date helper class and we are storing the user's timezone in the database. Now we want to use php's date_default_timezone_set method to set the timezone for each user. However the date_default_timezone_set takes a string as an argument which is different to timezones we have stored in the database. Is there an easy way to convert from ci's timezone to php's timezone? I think I might be able to achieve what I want by using gmt_to_local() but I am wondering if anyone else has any other ideas. Regards Panos |