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

Side by Side Diff: source/i18n/timezone.cpp

Issue 1058353002: Fix the tz detection code. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: add upstream bug ref Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « source/common/putilimp.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * Copyright (C) 1997-2015, International Business Machines Corporation and 3 * Copyright (C) 1997-2015, International Business Machines Corporation and
4 * others. All Rights Reserved. 4 * others. All Rights Reserved.
5 ******************************************************************************* 5 *******************************************************************************
6 * 6 *
7 * File TIMEZONE.CPP 7 * File TIMEZONE.CPP
8 * 8 *
9 * Modification History: 9 * Modification History:
10 * 10 *
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // We access system timezone data through TPlatformUtilities, 446 // We access system timezone data through TPlatformUtilities,
447 // including tzset(), timezone, and tzname[]. 447 // including tzset(), timezone, and tzname[].
448 int32_t rawOffset = 0; 448 int32_t rawOffset = 0;
449 const char *hostID; 449 const char *hostID;
450 450
451 // First, try to create a system timezone, based 451 // First, try to create a system timezone, based
452 // on the string ID in tzname[0]. 452 // on the string ID in tzname[0].
453 453
454 uprv_tzset(); // Initialize tz... system data 454 uprv_tzset(); // Initialize tz... system data
455 455
456 uprv_tzname_clear_cache();
457
456 // Get the timezone ID from the host. This function should do 458 // Get the timezone ID from the host. This function should do
457 // any required host-specific remapping; e.g., on Windows this 459 // any required host-specific remapping; e.g., on Windows this
458 // function maps the Date and Time control panel setting to an 460 // function maps the Date and Time control panel setting to an
459 // ICU timezone ID. 461 // ICU timezone ID.
460 hostID = uprv_tzname(0); 462 hostID = uprv_tzname(0);
461 463
462 // Invert sign because UNIX semantics are backwards 464 // Invert sign because UNIX semantics are backwards
463 rawOffset = uprv_timezone() * -U_MILLIS_PER_SECOND; 465 rawOffset = uprv_timezone() * -U_MILLIS_PER_SECOND;
464 466
465 TimeZone* hostZone = NULL; 467 TimeZone* hostZone = NULL;
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 return id; 1686 return id;
1685 } 1687 }
1686 #endif /* U_HIDE_DRAFT_API */ 1688 #endif /* U_HIDE_DRAFT_API */
1687 1689
1688 1690
1689 U_NAMESPACE_END 1691 U_NAMESPACE_END
1690 1692
1691 #endif /* #if !UCONFIG_NO_FORMATTING */ 1693 #endif /* #if !UCONFIG_NO_FORMATTING */
1692 1694
1693 //eof 1695 //eof
OLDNEW
« no previous file with comments | « source/common/putilimp.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698