Skip to content

Commit

Permalink
Use cast instead of localtimestamp for correct result
Browse files Browse the repository at this point in the history
  • Loading branch information
pj-spoelders committed Mar 22, 2024
1 parent 82f4a08 commit 694e242
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public String visit(final SqlLiteralTimestampUtc literal) {
if (exasolSqlDialect.isTimestampWithLocalTimeZoneEnabled()) {
LOGGER.info("IGNORE_ERRORS = '" + EXASOL_TIMESTAMP_WITH_LOCAL_TIME_ZONE_SWITCH + "' property is enabled.");

return "LOCALTIMESTAMP " + getDialect().getStringLiteral(literal.getValue());
return "cast(TIMESTAMP " + getDialect().getStringLiteral(literal.getValue()) + " as timestamp with local time zone)";
} else {
throw new UnsupportedOperationException(ExaError.messageBuilder("E-VSEXA-5") //
.message("Attention! Using literals and constant expressions with datatype "
Expand Down

0 comments on commit 694e242

Please sign in to comment.