|
@@ -74,7 +74,7 @@ public final class HddsClientUtils {
|
|
*/
|
|
*/
|
|
public static String formatDateTime(long millis) {
|
|
public static String formatDateTime(long millis) {
|
|
ZonedDateTime dateTime = ZonedDateTime.ofInstant(
|
|
ZonedDateTime dateTime = ZonedDateTime.ofInstant(
|
|
- Instant.ofEpochSecond(millis), DATE_FORMAT.get().getZone());
|
|
|
|
|
|
+ Instant.ofEpochMilli(millis), DATE_FORMAT.get().getZone());
|
|
return DATE_FORMAT.get().format(dateTime);
|
|
return DATE_FORMAT.get().format(dateTime);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -85,7 +85,7 @@ public final class HddsClientUtils {
|
|
public static long formatDateTime(String date) throws ParseException {
|
|
public static long formatDateTime(String date) throws ParseException {
|
|
Preconditions.checkNotNull(date, "Date string should not be null.");
|
|
Preconditions.checkNotNull(date, "Date string should not be null.");
|
|
return ZonedDateTime.parse(date, DATE_FORMAT.get())
|
|
return ZonedDateTime.parse(date, DATE_FORMAT.get())
|
|
- .toInstant().getEpochSecond();
|
|
|
|
|
|
+ .toInstant().toEpochMilli();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|