In this article, you will learn how to get the timezone from the abbreviation.
What is the syntax of the TIMEZONE_NAME_FROM_ABBR() function in PHP?
timezone_name_from_abbr(abbr, gmtoffset, isdst)
abbr | Timezone abbreviation – Required |
gmtoffset | Offset of the GMT in seconds – Optional By default it is -1 which returns the first find timezone. – Optional |
isdst | Daylight saving – – If required Daylight savings are not taken into the consideration. – gmtoffset offset object may save in effect. – gmtoffset convert the input without daylight savings. |
Examples of the TIMEZONE_NAME_FROM_ABBR() function
Example 1. In this example, we simply pass the place with the timezone_name_from_abbr() method the abbreviation of the given place.
<?php
echo timezone_name_from_abbr("EST")";
echo timezone_name_from_abbr("",54770,0);
?>