From 8b5c6b1498937a029c970c12e1cf9ccd800b0156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Sat, 15 Jun 2013 23:54:11 +0000 Subject: [PATCH] Document IntlDateFormatter::getTimeZone git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330514 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/intl/dateformatter/gettimezone.xml | 70 +++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/reference/intl/dateformatter/gettimezone.xml b/reference/intl/dateformatter/gettimezone.xml index 30d5d1d4c9..6d42dcf454 100644 --- a/reference/intl/dateformatter/gettimezone.xml +++ b/reference/intl/dateformatter/gettimezone.xml @@ -5,7 +5,7 @@ IntlDateFormatter::getTimeZone datefmt_get_timezone - Get formatter timezone + Get formatterʼs timezone @@ -26,7 +26,15 @@ - &warn.undocumented.func; + + Returns an IntlTimeZone object representing the + timezone that will be used by this object to format dates and times. When + formatting IntlCalendar and + DateTime objects with this + IntlDateFormatter, the timezone used will be the one + returned by this method, not the one associated with the objects being + formatted. + @@ -37,8 +45,66 @@ &reftitle.returnvalues; + + The associated IntlTimeZone + object&return.falseforfailure;. + + + &reftitle.examples; + + + <function>IntlDateFormatter::getTimeZone</function> examples + +getTimezone()); +echo $madrid->getTimezone()->getDisplayName( + false, IntlTimeZone::DISPLAY_GENERIC_LOCATION, "en_US"), "\n"; +echo $lisbon->getTimeZone()->getId(), "\n"; +//The id can also be retrieved with ->getTimezoneId() +echo $lisbon->getTimeZoneId(), "\n"; + +]]> + + &example.outputs; + + + bool(true) + ["id"]=> + string(13) "Europe/Madrid" + ["rawOffset"]=> + int(3600000) + ["currentOffset"]=> + int(7200000) +} +Spain Time +Europe/Lisbon +Europe/Lisbon + +]]> + + + + + + + &reftitle.seealso; + + + IntlDateFormatter::getTimeZoneId + IntlDateFormatter::setTimeZone + IntlTimeZone + + +