@Udf(description = "Converts a string representation of a date in the given format"
      + " into the TIMESTAMP value."
      + " Single quotes in the timestamp format can be escaped with '',"
      + " for example: 'yyyy-MM-dd''T''HH:mm:ssX'.")
  public Timestamp parseTimestamp(
      @UdfParameter(
          description = "The string representation of a date.") final String formattedTimestamp,
      @UdfParameter(
          description = "The format pattern should be in the format expected by"
              + " java.time.format.DateTimeFormatter.") final String formatPattern) {
    return parseTimestamp(formattedTimestamp, formatPattern, ZoneId.of("GMT").getId());
  }
@Test
  public void shouldSupportPSTTimeZone() {
    // When:
    final Object result = udf.parseTimestamp("2018-08-15 10:10:43",
        "yyyy-MM-dd HH:mm:ss", "America/Los_Angeles");

    // Then:
    assertThat(result, is(new Timestamp(1534353043000L)));
  }