[ 
https://issues.apache.org/jira/browse/LANG-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17230387#comment-17230387
 ] 

Arturo Bernal edited comment on LANG-1462 at 11/12/20, 6:48 AM:
----------------------------------------------------------------

Hi [~elunlng]

Could you check the problem? I'm sure that solve in the new versions

 
{code:java}
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"));{code}
 

The result that I get seems correct

 

Old time is 20201112073806
 New time is 20201112073806


was (Author: arturobernalg):
Hi [~elunlng]

Could you check the problem? I'm sure that solve in the new versions

 

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 result that I get seems correct

 

Old time is 20201112073806
New time is 20201112073806

 

 

 

 

 

 

 

 

 

> After version Commons-lang3.4 DateFormatUtils has a bug
> -------------------------------------------------------
>
>                 Key: LANG-1462
>                 URL: https://issues.apache.org/jira/browse/LANG-1462
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.time.*
>    Affects Versions: 3.5, 3.6, 3.7, 3.8, 3.9, 3.8.1
>            Reporter: Lijun Liang
>            Priority: Critical
>
> 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
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to