ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48008] touch task truncates timestamps
Date Wed, 21 Oct 2009 11:57:12 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48008

--- Comment #2 from Alexander Pogrebnyak <alex-pub.apache-ant@reflexion.net> 2009-10-21
04:57:09 UTC ---
(In reply to comment #1)
> Ant uses the lastModified and setLastModified methods in java.io.File
> http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html which doesn't allow a
> granularity smaller than millisecond.
> 
> I don't understand why outofdate seems to be rounding up here but as far as I
> can see there isn't anything touch could do differently as it set the last
> modified time to the one read from the source file.
> 
> CANTFIX rather than WONTFIX.

How about setting it to
newFile.setLastModified( origFile.lastModified() + 1 )

This will definitely round it in the right direction.  Plus it would probably
integrate better with the tools external to ant (e.g. make), that could have
used the newly created file.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message