Query: datefmt_get_timezone
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DATEFMT_GET_TIMEZONE(3) 1 DATEFMT_GET_TIMEZONE(3) IntlDateFormatter::getTimeZone - Get formatters timezone Object oriented styleSYNOPSISpublic IntlTimeZone IntlDateFormatter::getTimeZone (void )DESCRIPTIONProcedural 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.PARAMETERSThis function has no parameters.RETURN VALUESThe associated IntlTimeZone object or FALSE on failure.EXAMPLESExample #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/LisbonSEE ALSOIntlDateFormatter.getTimeZoneId(3), IntlDateFormatter.setTimeZone(3), IntlTimeZone. PHP Documentation Group DATEFMT_GET_TIMEZONE(3)
Related Man Pages |
---|
intldateformatter(3) - php |
datefmt_format(3) - php |
datefmt_format_object(3) - php |
datefmt_set_pattern(3) - php |
intldateformatter.gettimezone(3) - php |
Similar Topics in the Unix Linux Community |
---|
get the normal time |
Demographics of unix.com users |
Sorting arrays horizontally without END section, awk |
Tidal Stations - Europe and Africa |