From da0b4ab0b11136b831db5df6976078131b2b65b0 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Fri, 11 Feb 2000 16:17:03 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267601 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Tstamp.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java index 03c178ec2..c77028b1f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java +++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java @@ -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);