Created by: weiyanlin117
This fixed the issue at https://github.com/facebook/buck/issues/2316 This issue introduced from https://github.com/facebook/buck/commit/35c93b88c04ea88d1f65f149a73b7c549f38389a#diff-b12d580cc80ce3c8f0f5d2549fa61f67R4702
unlike ZipEntry
, TarArchiveEntry
would not include timezone convert.
https://docs.oracle.com/javase/8/docs/api/java/util/zip/ZipEntry.html#setTime-long-
https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/archivers/tar/TarArchiveEntry.html#setModTime-java.util.Date-
Since Calendar
class is timezone sensitive, we should not depend on Calendar generated unix timestamp in TarArchiveEntry
, but use
https://github.com/facebook/buck/blob/a6c7d7391a7a8e575c6372cac6690a240b5907ea/src/com/facebook/buck/cxx/toolchain/objectfile/ObjectFileCommonModificationDate.java#L25 directly as same as
https://github.com/facebook/buck/blob/a6c7d7391a7a8e575c6372cac6690a240b5907ea/src/com/facebook/buck/cxx/FileLastModifiedDateContentsScrubber.java#L28
since ObjectFileCommonModificationDate is more generic I moved it from cxx.toolchain
to util
.
com.facebook.buck.cxx.toolchain.objectfile.ObjectFileCommonModificationDate
--> com.facebook.buck.util.ObjectFileCommonModificationDate