julianhyde commented on code in PR #3653:
URL: https://github.com/apache/calcite/pull/3653#discussion_r1769266189
##########
core/src/main/java/org/apache/calcite/util/format/FormatElementEnum.java:
##########
@@ -436,8 +469,15 @@ static Work get() {
return castNonNull(THREAD_WORK.get());
}
- final Calendar calendar =
- Calendar.getInstance(DateTimeUtils.DEFAULT_ZONE, Locale.ROOT);
+ final Calendar calendar = new Calendar.Builder()
Review Comment:
Correction. If we do not call `setLocale` in the builder, the calendar will
use the default locale (calling <a
href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html#getDefault(java.util.Locale.Category)">Locale.getDefault(Category)</a>
and that would be bad. We should call `setLocale`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]