Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

timezone_name_from_abbr(3) [php man page]

TIMEZONE_NAME_FROM_ABBR(3)						 1						TIMEZONE_NAME_FROM_ABBR(3)

timezone_name_from_abbr - Returns the timezone name from abbreviation

SYNOPSIS
string timezone_name_from_abbr (string $abbr, [int $gmtOffset = -1], [int $isdst = -1]) DESCRIPTION
PARAMETERS
o $abbr - Time zone abbreviation. o $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. o $isdst - Daylight saving time indicator. Defaults to -1, which means that whether the time zone has daylight saving or not is not taken into consideration when searching. If this is set to 1, then the $gmtOffset is assumed to be an offset with daylight saving in effect; if 0, then $gmtOffset is assumed to be an offset without daylight saving in effect. If $abbr doesn't exist then the time zone is searched solely by the $gmtOffset and $isdst. RETURN VALUES
Returns time zone name on success or FALSE on failure. EXAMPLES
Example #1 A timezone_name_from_abbr(3) example <?php echo timezone_name_from_abbr("CET") . " "; echo timezone_name_from_abbr("", 3600, 0) . " "; ?> The above example will output something similar to: Europe/Berlin Europe/Paris SEE ALSO
timezone_abbreviations_list(3). PHP Documentation Group TIMEZONE_NAME_FROM_ABBR(3)

Check Out this Related Man Page

GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)				 1				  GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)

geoip_time_zone_by_country_and_region - Returns the time zone for some country and region code combo

SYNOPSIS
string geoip_time_zone_by_country_and_region (string $country_code, [string $region_code]) DESCRIPTION
The geoip_time_zone_by_country_and_region(3) function will return the time zone corresponding to a country and region code combo. In the United States, the region code corresponds to the two-letter abbreviation of each state. In Canada, the region code corresponds to the two-letter province or territory code as attributed by Canada Post. For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions. You can check http://www.maxmind.com/app/fips10_4 for a detailed list of FIPS 10-4 codes. This function is always available if using GeoIP Library version 1.4.1 or newer. The data is taken directly from the GeoIP Library and not from any database. PARAMETERS
o $country_code - The two-letter country code (see geoip_country_code_by_name(3)) o $region_code - The two-letter (or digit) region code (see geoip_region_by_name(3)) RETURN VALUES
Returns the time zone on success, or FALSE if the country and region code combo cannot be found. EXAMPLES
Example #1 A geoip_time_zone_by_country_and_region(3) example using region code for US/Canada This will print the time zone for country CA (Canada), region QC (Quebec). <?php $timezone = geoip_time_zone_by_country_and_region('CA', 'QC'); if ($timezone) { echo 'Time zone for CA/QC is: ' . $timezone; } ?> The above example will output: Time zone for CA/QC is: America/Montreal Example #2 A geoip_time_zone_by_country_and_region(3) example using FIPS codes This will print the time zone for country JP (Japan), region 01 (Aichi). <?php $timezone = geoip_time_zone_by_country_and_region('JP', '01'); if ($timezone) { echo 'Time zone for JP/01 is: ' . $timezone; } ?> The above example will output: Time zone for JP/01 is: Asia/Tokyo PHP Documentation Group GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)
Man Page