Skip to content

Commit

Permalink
fix(server): always get UTC dates from postgres (#15920)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 authored Feb 5, 2025
1 parent 1492b55 commit 48d421e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/repositories/config.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const getEnv = (): EnvData => {
}

const driverOptions = {
...parsedOptions,
onnotice: (notice: Notice) => {
if (notice['severity'] !== 'NOTICE') {
console.warn('Postgres notice:', notice);
Expand All @@ -247,7 +248,9 @@ const getEnv = (): EnvData => {
serialize: (value: number) => value.toString(),
},
},
...parsedOptions,
connection: {
TimeZone: 'UTC',
},
};

return {
Expand Down

0 comments on commit 48d421e

Please sign in to comment.