Share on Google+Share on Google+


This is the example of timezone-name-from-abbr() function in PHP used for returning the timezone name from abbreviation.

timezone_name_from_abbr() Function PHP

timezone_name_from_abbr function returns the timezone name from abbreviation. It returns timezone name on success or False on failure.

Syntax of timezone_name_from_abbr() Function PHP

timezone_name_from_abbr (abbr, gmtOffset = -1, isdst = -1)

Parameters on timezone_name_from_abbr() Function PHP

abbr - Time zone abbreviation.

gmtOffset - Offset from GMT in seconds. Defaults to -1 which means that first found time zone corresponding to abbr is returned. Otherwise exact offset is searched and only if not found then the first time zone with any offset is returned.

isdst - Daylight saving time indicator. If abbr doesn't exist then the time zone is searched only by offset and isdst .

Example of Timezone Names from Abbreviation PHP:


echo timezone_name_from_abbr("I") . "\n";

echo timezone_name_from_abbr("", 19800, 0) . "\n";


The above example will output something similar to:





Posted on: August 29, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null