I’m using the Codeigniter date helper for timezone functions. I want to display a user’s timezone location based on their timezone reference that I’m saving in the database.
Example:
Take a timezone reference UP1 and return the corresponding location (UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome. Date helper does not have a function for that.
The function could be executed like this..
echo timezone_location('UP1');
which will echo
(UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome
Codeigniter’s timezone data exists in the folder system/langauge/englishdate_lang.php but I’m not sure how to access that to build the function. What do you think?
CI stores it the language file system/language/english/date_lang.php
So you could do the following