public class TimestampUtils extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DATE_NEGATIVE_INFINITY |
static long |
DATE_NEGATIVE_SMALLER_INFINITY |
static long |
DATE_POSITIVE_INFINITY |
static long |
DATE_POSITIVE_SMALLER_INFINITY |
Constructor and Description |
---|
TimestampUtils() |
Modifier and Type | Method and Description |
---|---|
static Date |
toDate(TimeZone tz,
int days)
Returns the SQL Date object given the timezone and number of days
|
static long |
toPgSecs(long secs)
Converts the given java seconds to postgresql seconds.
|
public static final long DATE_POSITIVE_INFINITY
public static final long DATE_NEGATIVE_INFINITY
public static final long DATE_POSITIVE_SMALLER_INFINITY
public static final long DATE_NEGATIVE_SMALLER_INFINITY
public static Date toDate(TimeZone tz, int days)
tz
- The timezone used.public static long toPgSecs(long secs)
toJavaSecs(long)
for the reverse operation.
The conversion is valid for any year 100 BC onwards.secs
- Postgresql seconds.Copyright © 2019. All rights reserved.