commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (LANG-755) DateFormatUtils.format manipulates Calendar behaviour
Date Wed, 16 Nov 2011 07:20:52 GMT

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

Henri Yandell edited comment on LANG-755 at 11/16/11 7:20 AM:
--------------------------------------------------------------

Confirmed.

It appears to be a JDK bug, calling cal.get(Calendar.\*) undoes the cal.clear(Calendar.\*)
call. 
                
      was (Author: bayard):
    Confirmed.

It appears to be a JDK bug, calling cal.get(Calendar.*) undoes the cal.clear(Calendar.*) call.

                  
> DateFormatUtils.format manipulates Calendar behaviour
> -----------------------------------------------------
>
>                 Key: LANG-755
>                 URL: https://issues.apache.org/jira/browse/LANG-755
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.time.*
>            Reporter: hans-j├╝rgen kozik
>            Priority: Minor
>
> {code}
> @Test
> public void testClearCalendar() {
>   Calendar cal = Calendar.getInstance();
>   cal.clear(Calendar.MINUTE);
>   System.out.println(cal.isSet(Calendar.MINUTE)); //false
>   System.out.println(DateFormatUtils.ISO_DATETIME_FORMAT.format(cal));
>   System.out.println(cal.isSet(Calendar.MINUTE)); //true
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message