Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

datefmt_get_timezone(3) [php man page]

DATEFMT_GET_TIMEZONE(3) 						 1						   DATEFMT_GET_TIMEZONE(3)

IntlDateFormatter::getTimeZone - Get formatters timezone

	Object oriented style

SYNOPSIS
public IntlTimeZone IntlDateFormatter::getTimeZone (void ) DESCRIPTION
Procedural style IntlTimeZone datefmt_get_timezone (void ) Returns an IntlTimeZone object representing the timezone that will be used by this object to format dates and times. When formatting Intl- Calendar and DateTime objects with this IntlDateFormatter, the timezone used will be the one returned by this method, not the one associ- ated with the objects being formatted. PARAMETERS
This function has no parameters. RETURN VALUES
The associated IntlTimeZone object or FALSE on failure. EXAMPLES
Example #1 datefmt_get_timezone(3) examples <?php $madrid = IntlDateFormatter::create(NULL, NULL, NULL, 'Europe/Madrid'); $lisbon = IntlDateFormatter::create(NULL, NULL, NULL, 'Europe/Lisbon'); var_dump($madrid->getTimezone()); echo $madrid->getTimezone()->getDisplayName( false, IntlTimeZone::DISPLAY_GENERIC_LOCATION, "en_US"), " "; echo $lisbon->getTimeZone()->getId(), " "; //The id can also be retrieved with ->getTimezoneId() echo $lisbon->getTimeZoneId(), " "; The above example will output: object(IntlTimeZone)#4(4) { ["valid"]=> bool(true) ["id"]=> string(13) "Europe/Madrid" ["rawOffset"]=> int(3600000) ["currentOffset"]=> int(7200000) } Spain Time Europe/Lisbon Europe/Lisbon SEE ALSO
IntlDateFormatter.getTimeZoneId(3), IntlDateFormatter.setTimeZone(3), IntlTimeZone. PHP Documentation Group DATEFMT_GET_TIMEZONE(3)

Check Out this Related Man Page

INTLDATEFORMATTER.GETTIMEZONE(3)					 1					  INTLDATEFORMATTER.GETTIMEZONE(3)

IntlDateFormatter::getTimeZone - Get formatters timezone

	Object oriented style

SYNOPSIS
public IntlTimeZone IntlDateFormatter::getTimeZone (void ) DESCRIPTION
Procedural style IntlTimeZone datefmt_get_timezone (void ) Returns an IntlTimeZone object representing the timezone that will be used by this object to format dates and times. When formatting Intl- Calendar and DateTime objects with this IntlDateFormatter, the timezone used will be the one returned by this method, not the one associ- ated with the objects being formatted. PARAMETERS
This function has no parameters. RETURN VALUES
The associated IntlTimeZone object or FALSE on failure. EXAMPLES
Example #1 IntlDateFormatter.getTimeZone(3) examples <?php $madrid = IntlDateFormatter::create(NULL, NULL, NULL, 'Europe/Madrid'); $lisbon = IntlDateFormatter::create(NULL, NULL, NULL, 'Europe/Lisbon'); var_dump($madrid->getTimezone()); echo $madrid->getTimezone()->getDisplayName( false, IntlTimeZone::DISPLAY_GENERIC_LOCATION, "en_US"), " "; echo $lisbon->getTimeZone()->getId(), " "; //The id can also be retrieved with ->getTimezoneId() echo $lisbon->getTimeZoneId(), " "; The above example will output: object(IntlTimeZone)#4(4) { ["valid"]=> bool(true) ["id"]=> string(13) "Europe/Madrid" ["rawOffset"]=> int(3600000) ["currentOffset"]=> int(7200000) } Spain Time Europe/Lisbon Europe/Lisbon SEE ALSO
IntlDateFormatter.getTimeZoneId(3), IntlDateFormatter.setTimeZone(3), IntlTimeZone. PHP Documentation Group INTLDATEFORMATTER.GETTIMEZONE(3)
Man Page