Home Tutorial Php Phpdate timezone_name_from_abbr

 
 

timezone_name_from_abbr
Posted on: August 29, 2009 at 12:00 AM
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:

<?php


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


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


?>



The above example will output something similar to:



India/Kolkata


India/Kolkata

Related Tags for timezone_name_from_abbr:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.