How to get the timezone name from abbreviation in PHP

2 Answers

0 votes
// string timezone_name_from_abbr( string $abbr [, int $gmtOffset = -1 [, int $isdst = -1 ]])

echo timezone_name_from_abbr("CET"); // Central European Time
 
/*
run:

Europe/Berlin 
    
*/

 



answered Jul 21, 2016 by avibootz
edited Jul 21, 2016 by avibootz
0 votes
// string timezone_name_from_abbr( string $abbr [, int $gmtOffset = -1 [, int $isdst = -1 ]])

echo timezone_name_from_abbr("", 3600, 1)
 
/*
run:

Europe/London 
    
*/

 



answered Jul 21, 2016 by avibootz
...