You can get the UTC offset for one of the values ββof U(M|P)x using timezones() .
$offset = timezones('UP1');
From now on, I think the only way is some kind of custom mapping between the offset and the PHP timezone. You can use the time zones Etc/GMT(+|-)x , but the problem with them will be that they do not contain any information about the DST transition.
The problem in general is that UTC offsets are actually mapped to many different time zones, for example. UP1 ((UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome) is displayed on Europe/Berlin , Europe/Brussels , Europe/Copenhagen , Europe/Madrid , Europe/Paris , Europe/Rome , but also Africa/Luanda for example. Now the thing is becoming arbitrarily complex due to DST transitions that may not be available in some of these time zones.
If you donβt need the DST thing, the comparison between the return value of the timezones() function and the time zones Etc/GMT(+|-)x should be OK, otherwise you cannot use Codeigniter time zone processing at all, since the display is not unique.
Stefan gehrig
source share