ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant Diagnostics.java
Date Thu, 07 Apr 2005 17:59:11 GMT
jkf         2005/04/07 10:59:11

  Modified:    src/main/org/apache/tools/ant Diagnostics.java
  Log:
  Made compilable on 1.2 / 1.3
  
  Revision  Changes    Path
  1.27      +10 -4     ant/src/main/org/apache/tools/ant/Diagnostics.java
  
  Index: Diagnostics.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Diagnostics.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Diagnostics.java	7 Apr 2005 17:08:24 -0000	1.26
  +++ Diagnostics.java	7 Apr 2005 17:59:11 -0000	1.27
  @@ -453,9 +453,15 @@
           //calendar stuff.
           Calendar cal = Calendar.getInstance();
           TimeZone tz = cal.getTimeZone();
  -        long now = System.currentTimeMillis();
  -        out.println("Timezone "+tz.getDisplayName()
  -                + " offset="+tz.getOffset(now));
  -
  +        out.println("Timezone " + tz.getDisplayName()
  +                + " offset=" + tz.getOffset(cal.get(Calendar.ERA), 
  +                        cal.get(Calendar.YEAR),
  +                        cal.get(Calendar.MONTH),
  +                        cal.get(Calendar.DAY_OF_MONTH),
  +                        cal.get(Calendar.DAY_OF_WEEK),
  +                        ((cal.get(Calendar.HOUR_OF_DAY) * 60
  +                         + cal.get(Calendar.MINUTE)) * 60
  +                         + cal.get(Calendar.SECOND)) * 1000
  +                         + cal.get(Calendar.MILLISECOND)));
       }
   }
  
  
  

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


Mime
View raw message