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

Side by Side Diff: patches/tzdetect2.patch

Issue 1621943002: ICU 56 step 4: Apply post-56 fixes for measure/date format (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@56goog
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « patches/tzdetect.patch ('k') | patches/ucnv_name.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/source/common/putil.cpp b/source/common/putil.cpp
2 index 599dad9..0f5090c 100644
3 --- a/source/common/putil.cpp
4 +++ b/source/common/putil.cpp
5 @@ -970,6 +970,15 @@ static char* searchForTZFile(const char* path, DefaultTZInf o* tzInfo) {
6 return result;
7 }
8 #endif
9 +
10 +U_CAPI void U_EXPORT2
11 +uprv_tzname_clear_cache()
12 +{
13 +#if defined(CHECK_LOCALTIME_LINK) && !defined(DEBUG_SKIP_LOCALTIME_LINK)
14 + gTimeZoneBufferPtr = NULL;
15 +#endif
16 +}
17 +
18 U_CAPI const char* U_EXPORT2
19 uprv_tzname(int n)
20 {
21 diff --git a/source/common/putilimp.h b/source/common/putilimp.h
22 index d2c1c66..e3da340 100644
23 --- a/source/common/putilimp.h
24 +++ b/source/common/putilimp.h
25 @@ -483,6 +483,12 @@ U_INTERNAL int32_t U_EXPORT2 uprv_timezone(void);
26 U_INTERNAL const char* U_EXPORT2 uprv_tzname(int n);
27
28 /**
29 + * Reset the global tzname cache.
30 + * @internal
31 + */
32 +U_INTERNAL void uprv_tzname_clear_cache();
33 +
34 +/**
35 * Get UTC (GMT) time measured in milliseconds since 0:00 on 1/1/1970.
36 * This function is affected by 'faketime' and should be the bottleneck for all user-visible ICU time functions.
37 * @return the UTC time measured in milliseconds
38 diff --git a/source/i18n/timezone.cpp b/source/i18n/timezone.cpp
39 index 6b3f8d2..a80fdda 100644
40 --- a/source/i18n/timezone.cpp
41 +++ b/source/i18n/timezone.cpp
42 @@ -453,6 +453,8 @@ TimeZone::detectHostTimeZone()
43
44 uprv_tzset(); // Initialize tz... system data
45
46 + uprv_tzname_clear_cache();
47 +
48 // Get the timezone ID from the host. This function should do
49 // any required host-specific remapping; e.g., on Windows this
50 // function maps the Date and Time control panel setting to an
OLDNEW
« no previous file with comments | « patches/tzdetect.patch ('k') | patches/ucnv_name.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698