From ab8b8ef56641361215a1e445917ac8a4345a556d Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Tue, 24 Jun 2003 12:46:57 +0000
Subject: [PATCH] Allow 's datetime attribute to accept seconds as well.
PR: 21014
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274700 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 3 +
docs/manual/CoreTasks/touch.html | 9 +-
src/etc/testcases/taskdefs/touch.xml | 15 ++++
.../org/apache/tools/ant/taskdefs/Touch.java | 43 ++++++---
.../apache/tools/ant/taskdefs/TouchTest.java | 88 +++++++++++++++++++
5 files changed, 145 insertions(+), 13 deletions(-)
create mode 100644 src/etc/testcases/taskdefs/touch.xml
create mode 100644 src/testcases/org/apache/tools/ant/taskdefs/TouchTest.java
diff --git a/WHATSNEW b/WHATSNEW
index d73797024..135e355e7 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -440,6 +440,9 @@ Other changes:
* Added task allowing tasks to be defined using any BSF-supported
scripting language.
+* 's datetime attribute can now accept time with a granularity
+ of seconds as well. Bugzilla Report 21014.
+
Changes from Ant 1.5.2 to Ant 1.5.3
===================================
diff --git a/docs/manual/CoreTasks/touch.html b/docs/manual/CoreTasks/touch.html
index e3044a0ba..eb3922b87 100644
--- a/docs/manual/CoreTasks/touch.html
+++ b/docs/manual/CoreTasks/touch.html
@@ -37,7 +37,7 @@ of now works, all other cases will emit a warning.
datetime |
specifies the new modification time of the file
- in the format MM/DD/YYYY HH:MM AM_or_PM. |
+ in the format MM/DD/YYYY HH:MM AM_or_PM or MM/DD/YYYY HH:MM:SS AM_or_PM.
No |
@@ -56,8 +56,13 @@ hour times).
</touch>
changes the modification time to Oct, 09 1974 4:30 pm of all files and directories
found in src_dir
.
+ <touch file="myfile" datetime="06/28/2000 2:02:17 pm"/>
+creates myfile
if it doesn't exist and changes the
+modification time to Jun, 28 2000 2:02:17 pm (14:02:17 for those used to 24
+hour times), if the filesystem allows a precision of one second - a
+time close to it otherwise.
-Copyright © 2000-2001 Apache Software Foundation. All rights
+
Copyright © 2000-2001,2003 Apache Software Foundation. All rights
Reserved.