java.lang.Object
org.eclipse.jgit.junit.time.TimeUtil
Utility methods for handling timestamps
- Since:
- 5.1.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetLastModifiedOf(Path a, Path b) Set the lastModified time of file a to the one from file bstatic InstantsetLastModifiedWithOffset(Path path, long offsetMillis) Set the lastModified time of a given file by adding a given offset to the current lastModified time
-
Constructor Details
-
TimeUtil
public TimeUtil()
-
-
Method Details
-
setLastModifiedWithOffset
Set the lastModified time of a given file by adding a given offset to the current lastModified time- Parameters:
path- path of a file to set last modifiedoffsetMillis- offset in milliseconds, if negative the new lastModified time is offset before the original lastModified time, otherwise after the original time- Returns:
- the new lastModified time
-
setLastModifiedOf
Set the lastModified time of file a to the one from file b- Parameters:
a- file to set lastModified timeb- file to read lastModified time from
-