Skip to content

Commit

Permalink
record change, add @SInCE tags, closes #36
Browse files Browse the repository at this point in the history
  • Loading branch information
bodewig committed Sep 28, 2017
1 parent 2c5430b commit 01613e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions WHATSNEW
Expand Up @@ -35,6 +35,10 @@ Other changes:
it uploads, if the preserveLastModified attribute is set to
true for that task

* zip and the related tasks can now set the modfication time of all
entries to a fixed timestamp.
Github Pull Request #36

Changes from Ant 1.9.8 TO Ant 1.9.9
===================================

Expand Down
4 changes: 3 additions & 1 deletion src/main/org/apache/tools/ant/taskdefs/Zip.java
Expand Up @@ -125,7 +125,7 @@ public boolean isSelected(final Resource target) {
};

private String fixedModTime = null; // User-provided.
protected long modTimeMillis = 0; // Calculated.
private long modTimeMillis = 0; // Calculated.

/**
* If this flag is true, execute() will run most operations twice,
Expand Down Expand Up @@ -597,6 +597,7 @@ public Zip64ModeAttribute getZip64Mode() {
* that you must choose one of a or b, and [c] indicates that you
* may use or omit c. ±ZZZZ is the timezone offset, and may be
* literally "Z" to mean GMT.
* @since Ant 1.9.10
*/
public void setModificationtime(String time) {
fixedModTime = time;
Expand All @@ -605,6 +606,7 @@ public void setModificationtime(String time) {
/**
* The file modification time previously provided to
* {@link #setModificationtime(String)} or {@code null} if unset.
* @since Ant 1.9.10
*/
public String getModificationtime() {
return fixedModTime;
Expand Down
3 changes: 3 additions & 0 deletions src/main/org/apache/tools/ant/util/DateUtils.java
Expand Up @@ -95,6 +95,7 @@ public final class DateUtils {
* Provides a thread-local US-style date format. Exactly as used by
* {@code <touch>}, to minute precision:
* {@code SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.US)}
* @since Ant 1.9.10
*/
public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_MIN =
new ThreadLocal<DateFormat>() {
Expand All @@ -108,6 +109,7 @@ protected DateFormat initialValue() {
* Provides a thread-local US-style date format. Exactly as used by
* {@code <touch>}, to second precision:
* {@code SimpleDateFormat("MM/dd/yyyy hh:mm:ss a", Locale.US)}
* @since Ant 1.9.10
*/
public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_SEC =
new ThreadLocal<DateFormat>() {
Expand Down Expand Up @@ -349,6 +351,7 @@ public static Date parseIso8601DateTimeOrDate(String datestr)
* where {a|b} indicates that you must choose one of a or b, and [c]
* indicates that you may use or omit c. ±ZZZZ is the timezone offset, and
* may be literally "Z" to mean GMT.
* @since Ant 1.9.10
*/
public static Date parseLenientDateTime(String dateStr) throws ParseException {
try {
Expand Down

0 comments on commit 01613e0

Please sign in to comment.