From: Yoshito Umaoka Date: Tue, 6 Sep 2011 18:44:49 +0000 (+0000) Subject: ICU-8777 Fixed API doc for createTimeZone. Updated the description to explain the... X-Git-Tag: milestone-59-0-1~4552 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50758756b530a337dedf09e9b2d5f7ca1dcef546;p=icu ICU-8777 Fixed API doc for createTimeZone. Updated the description to explain the case for bad time zone ID - using Etc/Unknown instead of Etc/GMT as fallback zone ID. X-SVN-Rev: 30620 --- diff --git a/icu4c/source/i18n/unicode/timezone.h b/icu4c/source/i18n/unicode/timezone.h index 274df3c9885..059e55ac0cb 100644 --- a/icu4c/source/i18n/unicode/timezone.h +++ b/icu4c/source/i18n/unicode/timezone.h @@ -139,10 +139,10 @@ public: * Creates a TimeZone for the given ID. * @param ID the ID for a TimeZone, such as "America/Los_Angeles", * or a custom ID such as "GMT-8:00". - * @return the specified TimeZone, or the GMT zone if the given ID - * cannot be understood. Return result guaranteed to be non-null. If you - * require that the specific zone asked for be returned, check the ID of the - * return result. + * @return the specified TimeZone, or the GMT zone with ID + * UCAL_UNKNOWN_ZONE_ID ("Etc/Unknown") if the given ID cannot be understood. + * Return result guaranteed to be non-null. If you require that the specific zone asked + * for be returned, check the ID of the return result. * @stable ICU 2.0 */ static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID); diff --git a/icu4c/source/i18n/unicode/ucal.h b/icu4c/source/i18n/unicode/ucal.h index 6bd8e8e3b86..a2b0fc4b9cf 100644 --- a/icu4c/source/i18n/unicode/ucal.h +++ b/icu4c/source/i18n/unicode/ucal.h @@ -670,9 +670,9 @@ ucal_getNow(void); * month, and day. *

* Note: When unknown TimeZone ID is specified, the UCalendar returned - * by the function is initialized with GMT ("Etc/GMT") without any - * errors/warnings. If you want to check if a TimeZone ID is valid, - * use ucal_getCanonicalTimeZoneID prior to this function. + * by the function is initialized with GMT zone with TimeZone ID UCAL_UNKNOWN_ZONE_ID + * ("Etc/Unknown") without any errors/warnings. If you want to check if a TimeZone ID is valid + * prior to this function, use ucal_getCanonicalTimeZoneID. * * @param zoneID The desired TimeZone ID. If 0, use the default time zone. * @param len The length of zoneID, or -1 if null-terminated. @@ -684,6 +684,7 @@ ucal_getNow(void); * and then pass the locale to ucal_open with UCAL_DEFAULT as the type. * @param status A pointer to an UErrorCode to receive any errors * @return A pointer to a UCalendar, or 0 if an error occurred. + * @see #UCAL_UNKNOWN_ZONE_ID * @stable ICU 2.0 */ U_STABLE UCalendar* U_EXPORT2