| @@ -59,6 +59,10 @@ Other changes: | |||||
| it uploads, if the preserveLastModified attribute is set to | it uploads, if the preserveLastModified attribute is set to | ||||
| true for that task | 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.10.0 TO Ant 1.10.1 | Changes from Ant 1.10.0 TO Ant 1.10.1 | ||||
| ===================================== | ===================================== | ||||
| @@ -118,7 +118,7 @@ public class Zip extends MatchingTask { | |||||
| private final List<String> addedFiles = new Vector<>(); | private final List<String> addedFiles = new Vector<>(); | ||||
| private String fixedModTime = null; // User-provided. | 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, | * If this flag is true, execute() will run most operations twice, | ||||
| @@ -588,6 +588,7 @@ public class Zip extends MatchingTask { | |||||
| * that you must choose one of a or b, and [c] indicates that you | * 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 | * may use or omit c. ±ZZZZ is the timezone offset, and may be | ||||
| * literally "Z" to mean GMT. | * literally "Z" to mean GMT. | ||||
| * @since Ant 1.10.2 | |||||
| */ | */ | ||||
| public void setModificationtime(String time) { | public void setModificationtime(String time) { | ||||
| fixedModTime = time; | fixedModTime = time; | ||||
| @@ -596,6 +597,7 @@ public class Zip extends MatchingTask { | |||||
| /** | /** | ||||
| * The file modification time previously provided to | * The file modification time previously provided to | ||||
| * {@link #setModificationtime(String)} or {@code null} if unset. | * {@link #setModificationtime(String)} or {@code null} if unset. | ||||
| * @since Ant 1.10.2 | |||||
| */ | */ | ||||
| public String getModificationtime() { | public String getModificationtime() { | ||||
| return fixedModTime; | return fixedModTime; | ||||
| @@ -95,6 +95,7 @@ public final class DateUtils { | |||||
| * Provides a thread-local US-style date format. Exactly as used by | * Provides a thread-local US-style date format. Exactly as used by | ||||
| * {@code <touch>}, to minute precision: | * {@code <touch>}, to minute precision: | ||||
| * {@code SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.US)} | * {@code SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.US)} | ||||
| * @since Ant 1.10.2 | |||||
| */ | */ | ||||
| public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_MIN = | public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_MIN = | ||||
| new ThreadLocal<DateFormat>() { | new ThreadLocal<DateFormat>() { | ||||
| @@ -108,6 +109,7 @@ public final class DateUtils { | |||||
| * Provides a thread-local US-style date format. Exactly as used by | * Provides a thread-local US-style date format. Exactly as used by | ||||
| * {@code <touch>}, to second precision: | * {@code <touch>}, to second precision: | ||||
| * {@code SimpleDateFormat("MM/dd/yyyy hh:mm:ss a", Locale.US)} | * {@code SimpleDateFormat("MM/dd/yyyy hh:mm:ss a", Locale.US)} | ||||
| * @since Ant 1.10.2 | |||||
| */ | */ | ||||
| public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_SEC = | public static final ThreadLocal<DateFormat> EN_US_DATE_FORMAT_SEC = | ||||
| new ThreadLocal<DateFormat>() { | new ThreadLocal<DateFormat>() { | ||||
| @@ -349,6 +351,7 @@ public final class DateUtils { | |||||
| * where {a|b} indicates that you must choose one of a or b, and [c] | * 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 | * indicates that you may use or omit c. ±ZZZZ is the timezone offset, and | ||||
| * may be literally "Z" to mean GMT. | * may be literally "Z" to mean GMT. | ||||
| * @since Ant 1.10.2 | |||||
| */ | */ | ||||
| public static Date parseLenientDateTime(String dateStr) throws ParseException { | public static Date parseLenientDateTime(String dateStr) throws ParseException { | ||||
| try { | try { | ||||