INNER CODE UNIT · Java
SQL_TIMESTAMP
oracle/pgql-lang · pgql-spoofax/src/main/strategies/pgqllang/strategies/DateTimeFormatters.java:36
public static final DateTimeFormatter SQL_TIMESTAMP = new DateTimeFormatterBuilder() //
.append(SQL_DATE) //
.appendLiteral(' ') //
.append(SQL_TIME).toFormatter().withResolverStyle(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);
/**
* Differences with DateTimeFormatter.ISO_OFFSET_TIME: - seconds are optional in ISO but not in SQL - a zero offset in
* ISO can optionally be denoted by appending 'Z' at the end, but this is not allowed in SQL
*/
public static final DateTimeFormatter SQL_TIME_WITH_TIMEZONE = new DateTimeFormatterBuilder() //
.append(SQL_TIME) //
.appendOffset("+HH:MM", "").toFormatter();
/**
* Differences with DateTimeFormatter.ISO_OFFSET_DATE_TIME: - seconds are optional in ISO but not in SQL - date and
* time are separated by 'T' in ISO but by ' ' in SQL - a zero offset in ISO can optionally be denoted by appending
* 'Z' at the end, but this is not allowed in SQL
*/