ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/zip ZipOutputStream.java
Date Fri, 12 Nov 2004 12:04:59 GMT
bodewig     2004/11/12 04:04:59

  Modified:    src/main/org/apache/tools/zip ZipOutputStream.java
  Log:
  JDK 1.3-
  
  Revision  Changes    Path
  1.27      +6 -6      ant/src/main/org/apache/tools/zip/ZipOutputStream.java
  
  Index: ZipOutputStream.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ZipOutputStream.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ZipOutputStream.java	12 Nov 2004 10:21:36 -0000	1.26
  +++ ZipOutputStream.java	12 Nov 2004 12:04:59 -0000	1.27
  @@ -581,7 +581,7 @@
           written += 2;
   
           // last mod. time and date
  -        writeOut(toDosTime(ze.getTime()));
  +        writeOut(toDosTime(new Date(ze.getTime())));
           written += 4;
   
           // CRC
  @@ -669,7 +669,7 @@
           written += 2;
   
           // last mod. time and date
  -        writeOut(toDosTime(ze.getTime()));
  +        writeOut(toDosTime(new Date(ze.getTime())));
           written += 4;
   
           // CRC
  @@ -770,7 +770,7 @@
        * @since 1.1
        */
       protected static ZipLong toDosTime(Date time) {
  -        return new ZipLong(toDosTime(time.getTime()));
  +        return new ZipLong(toDosTime(time));
       }
   
       /**
  @@ -780,9 +780,9 @@
        *
        * @since 1.26
        */
  -    protected static byte[] toDosTime(long time) {
  +    protected static byte[] toDosTime(Date time) {
           Calendar cal = Calendar.getInstance();
  -        cal.setTimeInMillis(time);
  +        cal.setTime(time);
           int year = cal.get(Calendar.YEAR);
           if (year < 1980) {
               return DOS_TIME_MIN.getBytes();
  
  
  

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


Mime
View raw message