public class TimestampTZUtil extends Object
Constructor and Description |
---|
TimestampTZUtil() |
Modifier and Type | Method and Description |
---|---|
static TimestampTZ |
convert(Date date,
ZoneId defaultTimeZone) |
static TimestampTZ |
convert(Timestamp ts,
ZoneId defaultTimeZone) |
static Timestamp |
convertTimestampToZone(Timestamp ts,
ZoneId fromZone,
ZoneId toZone)
Timestamps are technically time zone agnostic, and this method sort of cheats its logic.
|
static TimestampTZ |
parse(String s) |
static TimestampTZ |
parse(String s,
ZoneId defaultTimeZone) |
static TimestampTZ |
parseOrNull(String s,
ZoneId defaultTimeZone) |
static ZoneId |
parseTimeZone(String timeZoneStr) |
public static TimestampTZ parse(String s)
public static TimestampTZ parse(String s, ZoneId defaultTimeZone)
public static TimestampTZ parseOrNull(String s, ZoneId defaultTimeZone)
public static TimestampTZ convert(Date date, ZoneId defaultTimeZone)
public static TimestampTZ convert(Timestamp ts, ZoneId defaultTimeZone)
public static Timestamp convertTimestampToZone(Timestamp ts, ZoneId fromZone, ZoneId toZone)
Copyright © 2022 The Apache Software Foundation. All rights reserved.