presto-main/src/main/java/io/prestosql/type/TimestampWithTimeZoneOperators.java/TimestampWithTimeZoneOperators/castToTimestamp
class TimestampWithTimeZoneOperators:    @ScalarOperator(CAST)
    @SqlType(StandardTypes.TIMESTAMP)
    public static long castToTimestamp(ConnectorSession session, @SqlType(StandardTypes.TIMESTAMP_WITH_TIME_ZONE) long value)
    {
        if (session.isLegacyTimestamp()) {
            return unpackMillisUtc(value);
        }

        ISOChronology chronology = getChronology(unpackZoneKey(value));
        return chronology.getZone().convertUTCToLocal(unpackMillisUtc(value));
    }