Class TimeZone
java.lang.Object
io.trino.operator.scalar.timetz.TimeZone
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.airlift.slice.SliceextractTimeZoneFromTime(long timeWithTimeZone) Extracts the time zone from a `time(p) with time zone` as a VARCHAR.static io.airlift.slice.SliceextractTimeZoneFromTimestamp(LongTimeWithTimeZone timeWithTimeZone) Extracts the time zone from a `time(p) with time zone` with a LongTimeWithTimeZone format as a VARCHAR.
-
Method Details
-
extractTimeZoneFromTime
public static io.airlift.slice.Slice extractTimeZoneFromTime(long timeWithTimeZone) Extracts the time zone from a `time(p) with time zone` as a VARCHAR. This function takes a packed long value representing the time with time zone and extracts the associated time zone offset.- Parameters:
timeWithTimeZone- the packed long representing a `time(p) with time zone`- Returns:
- the time zone offset in the format "+HH:mm" or "-HH:mm" as a VARCHAR
-
extractTimeZoneFromTimestamp
public static io.airlift.slice.Slice extractTimeZoneFromTimestamp(LongTimeWithTimeZone timeWithTimeZone) Extracts the time zone from a `time(p) with time zone` with a LongTimeWithTimeZone format as a VARCHAR.This function takes a LongTimeWithTimeZone object and extracts the associated time zone offset.
- Parameters:
timeWithTimeZone- the LongTimeWithTimeZone object- Returns:
- the time zone offset in the format "+HH:mm" or "-HH:mm" as a VARCHAR
-