mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
fix(database): postgresql release timestamps timezone handling (#1343)
fix(database): Correct timezone handling for release timestamps Changed the column type for release timestamps from 'timestamp' to 'timestamptz' in the PostgreSQL database. This update ensures that the release ages are accurately reflected in the web UI by storing the correct timezone information. Previously, the data was stored in UTC but interpreted as local user time, causing a 3-hour offset in the web UI or in my case 11-hour offset. The conversion now correctly interprets and displays the release times based on UTC. Fixes #1138
This commit is contained in:
parent
c600f41e5a
commit
47a1af8600
1 changed files with 4 additions and 1 deletions
|
@ -230,7 +230,7 @@ CREATE TABLE "release"
|
||||||
filter TEXT,
|
filter TEXT,
|
||||||
protocol TEXT,
|
protocol TEXT,
|
||||||
implementation TEXT,
|
implementation TEXT,
|
||||||
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
timestamp TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
||||||
info_url TEXT,
|
info_url TEXT,
|
||||||
download_url TEXT,
|
download_url TEXT,
|
||||||
group_id TEXT,
|
group_id TEXT,
|
||||||
|
@ -862,5 +862,8 @@ ALTER TABLE filter
|
||||||
`UPDATE irc_network
|
`UPDATE irc_network
|
||||||
SET server = 'irc.nebulance.io'
|
SET server = 'irc.nebulance.io'
|
||||||
WHERE server = 'irc.nebulance.cc';
|
WHERE server = 'irc.nebulance.cc';
|
||||||
|
`,
|
||||||
|
`ALTER TABLE "release"
|
||||||
|
ALTER COLUMN timestamp TYPE timestamptz USING timestamp AT TIME ZONE 'UTC';
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue