public class DateUtils extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Date |
fromSecondsSinceEpoch(long time)
Converts the specified Unix epoch time in seconds to a date object.
|
static long |
toSecondsSinceEpoch(java.util.Date date)
Converts the specified date object to a Unix epoch time in seconds.
|
public static long toSecondsSinceEpoch(java.util.Date date)
date
- The date. Must not be null
.public static java.util.Date fromSecondsSinceEpoch(long time)
time
- The Unix epoch time, in seconds. Must not be negative.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.