code: public static long parseTimestampLiteral(String value)
      {
          try {
              DateTime dateTime = TIMESTAMP_WITH_TIME_ZONE_FORMATTER.parseDateTime(value);
              return packDateTimeWithZone(dateTime);
          }
          catch (Exception e) {
              return TIMESTAMP_WITHOUT_TIME_ZONE_FORMATTER.parseMillis(value);
          }
      }
docs: Parse a string (optionally containing a zone) as a value of either TIMESTAMP or TIMESTAMP WITH TIME ZONE type.
  <p>
  For example: {@code "2000-01-01 01:23:00"} is parsed to TIMESTAMP {@code 2000-01-01T01:23:00}
  and {@code "2000-01-01 01:23:00 +01:23"} is parsed to TIMESTAMP WITH TIME ZONE
  {@code 2000-01-01T01:23:00.000+01:23}.
  
  @return stack representation of TIMESTAMP or TIMESTAMP WITH TIME ZONE type, depending on input