Skip to content

Fix build fail when locale is not en - #441

Closed
dachuan9e wants to merge 2 commits into
apache:mainfrom
dachuan9e:build-locale-fix
Closed

dachuan9e wants to merge 2 commits into
apache:mainfrom
dachuan9e:build-locale-fix

Conversation

@dachuan9e

@dachuan9e dachuan9e commented Aug 10, 2021 •

Copy link
Copy Markdown
Contributor

It will build fail when the locale is not set to en. Apache ant cannot support different locale format of time stamp. Showing the root cause by the following code in Ant. It needs to use the 24-hour format to avoid this issue.

    public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_MIN =
            ThreadLocal.withInitial(() -> new SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.US));

    public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_SEC =
            ThreadLocal.withInitial(() -> new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a", Locale.US));

@markt-asf

Copy link
Copy Markdown
Contributor

Thanks for the PR. I applied it manually so I could add a change log entry.

@markt-asf markt-asf closed this Aug 17, 2021
@dachuan9e
dachuan9e deleted the build-locale-fix branch August 23, 2021 03:00
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.

2 participants