Constructor and Description |
---|
LegacyTimestamp() |
LegacyTimestamp(long milliseconds) |
Modifier and Type | Method and Description |
---|---|
long |
calcDifferenceInNanoseconds(Timestamp other)
Gets the difference to the passed timestamps in nanoseconds.
|
Date |
toDate()
Converts the timestamp to a
Date . |
Instant |
toInstant()
Converts the timestamp to an
Instant . |
Timestamp |
toSqlTimestamp()
Converts the timestamp to an
SQL Timestamp . |
public LegacyTimestamp()
public LegacyTimestamp(long milliseconds)
milliseconds
- Milliseconds since January 1, 1970, 00:00:00 GMTpublic Date toDate()
Timestamp
Date
.@IgnoreJRERequirement public Instant toInstant()
Timestamp
Instant
.public Timestamp toSqlTimestamp()
Timestamp
SQL Timestamp
.toSqlTimestamp
in interface Timestamp
SQL Timestamp
public long calcDifferenceInNanoseconds(Timestamp other)
Timestamp
calcDifferenceInNanoseconds
in interface Timestamp
other
- Timestamp to subtractCopyright © 2024. All rights reserved.