Skip to content

Commit d8cbf31

Browse files
fix for HH12 time mapping
1 parent 6931eec commit d8cbf31

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

sqlglot-integration-tests

sqlglot/dialects/redshift.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Redshift(Postgres):
2525
# ref: https://docs.aws.amazon.com/redshift/latest/dg/r_FORMAT_strings.html
2626
TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
2727
TIME_MAPPING = {**Postgres.TIME_MAPPING, "MON": "%b", "HH24": "%H", "HH": "%I"}
28+
INVERSE_TIME_MAPPING = {**Postgres.INVERSE_TIME_MAPPING, "%I": "HH12", "%H": "HH24"}
2829

2930
Parser = RedshiftParser
3031

0 commit comments

Comments
 (0)