Skip to content

Commit 7165578

Browse files
author
Gary Gregory
committed
Simpler way to get the current time.
1 parent bcb8a8c commit 7165578

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/java/org/apache/commons/io/FileUtilsTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ public void testCopyFile2WithoutFileDatePreservation() throws Exception {
12311231
backDateFile10Minutes(testFile1); // set test file back 10 minutes
12321232

12331233
// destination file time should not be less than this (allowing for granularity)
1234-
final long now = new Date().getTime() - 1000L;
1234+
final long now = System.currentTimeMillis() - 1000L;
12351235
FileUtils.copyFile(testFile1, destFile, false);
12361236
assertTrue(destFile.exists(), "Check Exist");
12371237
assertEquals(testFile2Size, destFile.length(), "Check Full copy");

0 commit comments

Comments
 (0)