Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
3.5, 3.6, 3.7, 3.8, 3.9, 3.8.1
-
None
Description
The code is as follows :
Calendar cale = Calendar.getInstance();
System.out.println("Old time is " + DateFormatUtils.format(cale, "yyyyMMddHHmmss"));
cale.setTimeZone(TimeZone.getTimeZone("JST"));
System.out.println("New time is " + DateFormatUtils.format(cale, "yyyyMMddHHmmss"));
The results of commons-lang3 3.4:
Old time is 20190605144536
New time is 20190605154536
The results of the version after commons-lang3 3.4:
Old time is 20190605144536
New time is 20190605144536
We found that the time zone setting was invalidated when it was formatted