+5
-3
internal/storage/postgres.go
+5
-3
internal/storage/postgres.go
···
2058
2058
2059
2059
result, err := tx.Exec(ctx, `
2060
2060
INSERT INTO pds_repos (endpoint_id, did, head, rev, active, status, first_seen, last_seen)
2061
-
SELECT $1, did, head, rev, active, status, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
2061
+
SELECT $1, did, head, rev, active, status,
2062
+
TIMEZONE('UTC', NOW()),
2063
+
TIMEZONE('UTC', NOW())
2062
2064
FROM temp_new_repos
2063
2065
`, endpointID)
2064
2066
if err != nil {
···
2102
2104
rev = t.rev,
2103
2105
active = t.active,
2104
2106
status = t.status,
2105
-
last_seen = CURRENT_TIMESTAMP,
2106
-
updated_at = CURRENT_TIMESTAMP
2107
+
last_seen = TIMEZONE('UTC', NOW()),
2108
+
updated_at = TIMEZONE('UTC', NOW())
2107
2109
FROM temp_changed_repos t
2108
2110
WHERE pds_repos.endpoint_id = $1
2109
2111
AND pds_repos.did = t.did