DescriptionTimezone name check fix
1. Location names with more than one underscores (e.g. Ho_Chi_Minh)
didn't work because of the way capturing works with repeated patterns
in RE. It's now supported by changing the RE to capture the whole string
and splitting on '_' in the next step.
2. Adds support for location names with a hyphen
3. Adds support for timezone ids with three parts (e.g.
American/Argentina/Buenos_Aires)
4. Adds special handling of 'au', 'es' and 'of' in zone ids. They need to be kept in lowercase. (see the full list at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones )
5. Adds regression tests for all the above and make the existing tests
more robust against future ICU changes. ICU canonicalizes zone names to
deprecated names, but it may change. (
http://bugs.icu-project.org/trac/ticket/12044 )
BUG=364374
LOG=Y
Committed: https://crrev.com/4e18190e690cdee8de2a7d9290ad6b8f45600f4c
Cr-Commit-Position: refs/heads/master@{#33097}
Patch Set 1 #Patch Set 2 : regex + split to validate the input #Patch Set 3 : hyphen support, regression test #Patch Set 4 : handle tzids with hyphen; add regression tests #Patch Set 5 : use === and !== #Patch Set 6 : make tests more robust against future icu changes #Patch Set 7 : use crbug for regression test; error msg clean up; test clean up #Patch Set 8 : todo comment added for Etc/GMT{offset} #
Messages
Total messages: 28 (15 generated)
|