mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 04:24:35 +03:00
697137dd77
## Description As identified in hasura/graphql-engine#8096, the format string we used for timestamps was incorrect; we were using `%F`, which expands to `%Y-%m-%d`; but that meant that the year was not padded to four digits: `0001` would be represented simply as `1`. However, Postgres inteprets that `1` as `2001`, probably due to interpretation rules about two-digit years (in `25/12/01`, `01` is indeed `2001`). ``` # create table timestamp_test ( test timestamptz ); CREATE TABLE # insert into timestamp_test values ('1-01-01T00:00:57Z'); INSERT 0 1 # select * from timestamp_test; test ------------------------ 2001-01-01 00:00:57+00 (1 row) ``` To fix this, this PR changes the format string to use `%0Y`, which always pads the year number with zeroes. ## Remaining work - [x] write Changelog entry - [ ] copy timestamp tests from the python suite into the hspec tests PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3536 GitOrigin-RevId: fa144111358339fd4a35b32d888c1d2c5b418ea6 |
||
---|---|---|
.. | ||
Connection | ||
DDL | ||
Execute | ||
Instances | ||
Schema | ||
SQL | ||
Translate | ||
Types | ||
Connection.hs | ||
DDL.hs |