Skip to content

Commit

Permalink
Merge pull request #5005 from weichou1229/postgres-utc
Browse files Browse the repository at this point in the history
fix: Using current time in UTC as default in Postgresql
  • Loading branch information
cloudxxx8 authored Nov 19, 2024
2 parents 7addbec + 64c457b commit ba9e2b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/core-keeper/res/db/sql/01-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ CREATE TABLE IF NOT EXISTS core_keeper.config (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
key TEXT NOT NULL,
value TEXT NOT NULL,
created timestamp NOT NULL DEFAULT now(),
modified timestamp NOT NULL DEFAULT now()
created timestamp NOT NULL DEFAULT (now() AT TIME ZONE 'utc'),
modified timestamp NOT NULL DEFAULT (now() AT TIME ZONE 'utc')
);

-- core_keeper.registry is used to store the registry information
Expand Down
2 changes: 1 addition & 1 deletion cmd/support-scheduler/res/db/sql/01-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ CREATE TABLE IF NOT EXISTS support_scheduler.record (
action JSONB NOT NULL,
status TEXT NOT NULL,
scheduled_at timestamp NOT NULL,
created timestamp NOT NULL DEFAULT now()
created timestamp NOT NULL DEFAULT (now() AT TIME ZONE 'utc')
);

0 comments on commit ba9e2b1

Please sign in to comment.