Skip to content

use Locale.ENGLISH when parsing dates in Converter.DATE#426

Open
rootvector2 wants to merge 1 commit into
apache:masterfrom
rootvector2:converter-date-locale
Open

use Locale.ENGLISH when parsing dates in Converter.DATE#426
rootvector2 wants to merge 1 commit into
apache:masterfrom
rootvector2:converter-date-locale

Conversation

@rootvector2

Copy link
Copy Markdown

Converter.DATE parses with a default-locale SimpleDateFormat, but its documented input (the output of Date.toString()) always uses English month and day names, so a Date-typed option throws ParseException under any non-English default locale; pinning Locale.ENGLISH keeps the documented round-trip stable, which is also why testCreateDate already needed a @DefaultLocale pin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant