Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build fail when locale is not en #441

Closed
wants to merge 2 commits into from

Conversation

dachuan9e
Copy link
Contributor

@dachuan9e dachuan9e commented Aug 10, 2021

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
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
2 participants