Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: source/i18n/timezone.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/tblcoll.cpp ('k') | source/i18n/tmunit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/timezone.cpp
diff --git a/source/i18n/timezone.cpp b/source/i18n/timezone.cpp
index e656a7a8b90c924d0d582be63bebca04bca4d69f..6ed008df6142ca18ef5d6a14c0d95e4d333e494b 100644
--- a/source/i18n/timezone.cpp
+++ b/source/i18n/timezone.cpp
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 1997-2013, International Business Machines Corporation and
+* Copyright (C) 1997-2014, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
@@ -1293,6 +1293,8 @@ TimeZone::getCustomID(const UnicodeString& id, UnicodeString& normalized, UError
int32_t sign, hour, min, sec;
if (parseCustomID(id, sign, hour, min, sec)) {
formatCustomID(hour, min, sec, (sign < 0), normalized);
+ } else {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
}
return normalized;
}
@@ -1538,6 +1540,11 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode
getCanonicalID(id, canonicalID, isSystemID, status);
if (U_FAILURE(status) || !isSystemID) {
// mapping data is only applicable to tz database IDs
+ if (status == U_ILLEGAL_ARGUMENT_ERROR) {
+ // getWindowsID() sets an empty string where
+ // getCanonicalID() sets a U_ILLEGAL_ARGUMENT_ERROR.
+ status = U_ZERO_ERROR;
+ }
return winid;
}
« no previous file with comments | « source/i18n/tblcoll.cpp ('k') | source/i18n/tmunit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698