You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ru...@locus.apache.org on 2000/02/11 17:17:03 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Tstamp.java

rubys       00/02/11 08:17:03

  Modified:    src/main/org/apache/tools/ant/taskdefs Tstamp.java
  Log:
  The Tstamp task uses incorrect formatting strings for DSTAMP & TSTAMP:
  
  * Use the month format in DSTAMP (mm is minutes)
  * Use the 24-hour hour format in TSTAMP (otherwise, at 7pm the TSTAMP will
  be 0700 instead of 1900).
  Submitted by: Glenn Twiggs <Gl...@bmc.com>
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
  
  Index: Tstamp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tstamp.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Tstamp.java	2000/02/11 01:31:24	1.3
  +++ Tstamp.java	2000/02/11 16:17:03	1.4
  @@ -71,10 +71,10 @@
           try {
               Date d = new Date();
   
  -            SimpleDateFormat dstamp = new SimpleDateFormat ("yyyymmdd");
  +            SimpleDateFormat dstamp = new SimpleDateFormat ("yyyyMMdd");
               project.setProperty("DSTAMP", dstamp.format(d));
   
  -            SimpleDateFormat tstamp = new SimpleDateFormat ("hhmm");
  +            SimpleDateFormat tstamp = new SimpleDateFormat ("HHmm");
               project.setProperty("TSTAMP", tstamp.format(d));
   
               SimpleDateFormat today  = new SimpleDateFormat ("MMMM d yyyy", Locale.US);