mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 05:21:47 +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 |
||
---|---|---|
.. | ||
bench-wrk | ||
benchmarks | ||
documentation | ||
packaging | ||
src-dc-api | ||
src-exec | ||
src-lib | ||
src-rsr | ||
src-test | ||
tests-dc-api | ||
tests-hspec | ||
tests-py | ||
.dockerignore | ||
.gitignore | ||
commit_diff.txt | ||
COMPILING-ON-MACOS.md | ||
CONTRIBUTING.md | ||
graphql-engine.cabal | ||
Makefile | ||
STYLE.md | ||
testing-guidelines.md |