[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search

CLDR Ticket #11025(new tools)

Opened 3 weeks ago

Last modified 3 weeks ago

SupplementalMapper parses dates using the default locale

Reported by: roubert Owned by: anybody
Component: util Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:

Description (last modified by roubert) (diff)

SupplementalMapper.getMilliSeconds() is supposed to parse dates in a standardized format.

But it currently calls the default constructor of SimpleDateFormat() which uses the default locale (in my own case set by the value of the LC_CTYPE environment variable) to determine the parsing behaviour.

Because of this, building ICU data from CLDR fails in every environment where the default locale doesn't parse like the root locale.

[cldr-build] java.lang.IllegalArgumentException: Could not parse date: -2636-01-01
[cldr-build] 	at org.unicode.cldr.icu.SupplementalMapper.getSeconds(SupplementalMapper.java:369)

The attached patch solves this problem by explicitly passing ULocale.ROOT to the SimpleDateFormat constructor.



cldr-ticket-11025-patch-1.diff (1.2 KB) - added by roubert 3 weeks ago.

Change History

Changed 3 weeks ago by roubert

comment:1 Changed 3 weeks ago by roubert

  • Description modified (diff)

Add a comment

Modify Ticket

as new

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.