You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/08/07 18:15:27 UTC

[commons-io] branch master updated: Simpler way to get the current time.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 7165578  Simpler way to get the current time.
7165578 is described below

commit 716557825e4440a7f799982ba1c41e9282d9f4c5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 7 14:15:20 2020 -0400

    Simpler way to get the current time.
---
 src/test/java/org/apache/commons/io/FileUtilsTestCase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
index ee14cbd..644a019 100644
--- a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
+++ b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
@@ -1231,7 +1231,7 @@ public class FileUtilsTestCase {
         backDateFile10Minutes(testFile1); // set test file back 10 minutes
 
         // destination file time should not be less than this (allowing for granularity)
-        final long now = new Date().getTime() - 1000L;
+        final long now = System.currentTimeMillis() - 1000L;
         FileUtils.copyFile(testFile1, destFile, false);
         assertTrue(destFile.exists(), "Check Exist");
         assertEquals(testFile2Size, destFile.length(), "Check Full copy");