Browse Source

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 <Glenn_Twiggs@bmc.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267601 13f79535-47bb-0310-9956-ffa450edef68
master
Sam Ruby 25 years ago
parent
commit
da0b4ab0b1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/Tstamp.java

+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/Tstamp.java View File

@@ -71,10 +71,10 @@ public class Tstamp extends Task {
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);


Loading…
Cancel
Save