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

Unified Diff: source/test/intltest/tztest.cpp

Issue 1062503003: Cherry pick an upstream cl for host tz detection (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: add a patch file Created 5 years, 9 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/unicode/timezone.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/intltest/tztest.cpp
diff --git a/source/test/intltest/tztest.cpp b/source/test/intltest/tztest.cpp
index 4111e51a5d7ab72c293ac964a26132ad64baea89..76304e905782aded6fe944c3263f43745d0f362d 100644
--- a/source/test/intltest/tztest.cpp
+++ b/source/test/intltest/tztest.cpp
@@ -135,6 +135,13 @@ TimeZoneTest::TestGenericAPI()
infoln("WARNING: t_timezone may be incorrect. It is not a multiple of 15min.", tzoffset);
}
+ TimeZone* hostZone = TimeZone::detectHostTimeZone();
+ /* Host time zone's offset should match the offset returned by uprv_timezone() */
+ if (hostZone->getRawOffset() != tzoffset * (-1000)) {
+ errln("FAIL: detectHostTimeZone()'s raw offset != host timezone's offset");
+ }
+ delete hostZone;
+
UErrorCode status = U_ZERO_ERROR;
const char* tzver = TimeZone::getTZDataVersion(status);
if (U_FAILURE(status)) {
« no previous file with comments | « source/i18n/unicode/timezone.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698