andrebrait commented on code in PR #345:
URL: https://github.com/apache/commons-compress/pull/345#discussion_r1059196161


##########
src/main/java/org/apache/commons/compress/utils/TimeUtils.java:
##########
@@ -46,6 +46,62 @@ public final class TimeUtils {
      */
     static final long WINDOWS_EPOCH_OFFSET = -116444736000000000L;
 
+    /**
+     * Converts "standard UNIX time" (in seconds, UTC/GMT) to {@link FileTime}.
+     *
+     * @param time UNIX timestamp
+     * @return the corresponding FileTime
+     */
+    public static FileTime unixTimeToFileTime(final long time) {
+        return FileTime.from(time, TimeUnit.SECONDS);
+    }
+
+    /**
+     * Converts {@link FileTime} to "standard UNIX time".
+     *
+     * @param time the original FileTime
+     * @return the UNIX timestamp
+     */
+    public static long fileTimeToUnixTime(final FileTime time) {

Review Comment:
   The scale isn't included in the name, is it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to