The timezone_name_from_abbr() function is used to get the name of timezone from an abbreviation.
timezone_name_from_abbr($abbr, [$gmtoffset[, $isdst]]);
|Sr.No||Parameter & Description|
This is a string value representing the abbreviation for which you need to know the name of the time zone .
This is an integer value representing an offset from GMT in seconds. If a value for this is given then its timezone is searched and returned. If not found first found timezone (according to given abbreviation) is returned.
This is an integer value specifying the daylight saving of the timezone. If value passed for this parameter is 0 it indicates that there is no daylight saving, if it is 1 there is a dalight saving and, if it is 0 the day light saving is not considered.
<?php $res = timezone_name_from_abbr("PST"); print($res); ?>
<?php //setting the timezone $res = timezone_name_from_abbr("", 3600, 0); print($res); ?>
echo timezone_name_from_abbr("CET")."\n"; echo timezone_name_from_abbr("", 3600, 0);
Do feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.
Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.
Thanks for reading and bye for now.