commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Honton (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LANG-1166) FastDateFormat does not honour 'ZZ' pattern
Date Wed, 26 Aug 2015 02:26:45 GMT

     [ https://issues.apache.org/jira/browse/LANG-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Charles Honton resolved LANG-1166.
----------------------------------
    Resolution: Won't Fix
      Assignee: Charles Honton

> FastDateFormat does not honour 'ZZ' pattern
> -------------------------------------------
>
>                 Key: LANG-1166
>                 URL: https://issues.apache.org/jira/browse/LANG-1166
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.time.*
>    Affects Versions: 3.4
>            Reporter: Abhishek Gupta
>            Assignee: Charles Honton
>             Fix For: 3.5
>
>
> A date format of "yyyy-MM-dd'T'HH:mm:ss.SSS ZZ" returns "2015-08-13T11:37:13.203  Z"
for UTC timezone in version 3.4.
> Same format with version 3.3.2 returns "2015-08-13T11:39:28.452 +00:00"
> The code which i am using to test this is as follows:
> {code:java}
> import org.apache.commons.lang3.time.FastDateFormat;
> import java.util.Date;
> import java.util.TimeZone;
> public class FastDateFormatTest {
>     private static final String         DATE_FORMAT    = "yyyy-MM-dd'T'HH:mm:ss.SSS ZZ";
>     private static       FastDateFormat fastDateFormat = FastDateFormat.getInstance(DATE_FORMAT,
TimeZone.getTimeZone("UTC"));
>     public static void main(String[] args) {
>         System.out.println("fastDateFormat = " + fastDateFormat.format(new Date()));
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message