commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bur...@apache.org
Subject cvs commit: jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/tools ISO8601DateParser.java
Date Mon, 18 Oct 2004 18:01:14 GMT
burton      2004/10/18 11:01:13

  Modified:    feedparser/src/java/org/apache/commons/feedparser/tools
                        ISO8601DateParser.java
  Log:
  Use the UTC timezone when generating an ISO8601 timestamp for Atom feeds
  
  Revision  Changes    Path
  1.4       +10 -2     jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/tools/ISO8601DateParser.java
  
  Index: ISO8601DateParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/tools/ISO8601DateParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ISO8601DateParser.java	28 Jun 2004 01:04:37 -0000	1.3
  +++ ISO8601DateParser.java	18 Oct 2004 18:01:13 -0000	1.4
  @@ -99,6 +99,12 @@
           
       }
   
  +    public static String toString( Date date ) {
  +        
  +        return toString( date, TimeZone.getTimeZone( "UTC" ) );
  +        
  +    }
  +
       public static String toString( Date date, TimeZone tz ) {
   
           df.setTimeZone( tz );
  @@ -120,7 +126,9 @@
           System.out.println( parse( "2004-05-31T09:19:31-06:00" ) );
           System.out.println( parse( "2004-06-23T17:25:31-00:00" ) );
           System.out.println( parse( "2004-06-23T17:25:31Z" ) );
  -        
  +
  +        System.out.println( "v: " + toString( new Date( System.currentTimeMillis() ) )
);
  +
       }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message