java.lang.Object
io.aiven.commons.kafka.connector.common.templating.TimestampParser

public final class TimestampParser extends Object
Timestamp parser utilities.
  • Field Details

    • UTC

      public static final TimeZone UTC
      Definition of UTC Timezone
    • VALIDATOR

      public static org.apache.kafka.common.config.ConfigDef.Validator VALIDATOR
      A validator for a timestamp template part.
  • Method Details

    • getFormatter

      public static SimpleDateFormat getFormatter(VariableTemplatePart timestampTemplatePart)
      Gets a SimpleDateFormat for the timestamp template. By default, the timezone is set to UTC.
      Parameters:
      timestampTemplatePart - the timestamp template part
      Returns:
      the SimpleDateFormat with UTC timezone.
    • getFormatter

      public static SimpleDateFormat getFormatter(String format)
      Gets a SimpleDateFormat for the timestamp template. By default, the timezone is set to UTC.
      Parameters:
      format - the format for the timestamp
      Returns:
      the SimpleDateFormat with UTC timezone.