Skip to content

Commit 86c596d

Browse files
committed
Fix EU Genshin wish timestamps
1 parent b5acf0c commit 86c596d

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
-- The official wish API reports Europe as `os_euro`. The importer previously
2+
-- missed that value and interpreted its local timestamps as UTC+8 instead of
3+
-- UTC+1, storing the resulting instants seven hours too early.
4+
5+
UPDATE gi_wishes_beginner
6+
SET timestamp = timestamp + INTERVAL '7 hours'
7+
WHERE uid >= 700000000 AND uid < 800000000 AND official;
8+
9+
UPDATE gi_wishes_standard
10+
SET timestamp = timestamp + INTERVAL '7 hours'
11+
WHERE uid >= 700000000 AND uid < 800000000 AND official;
12+
13+
UPDATE gi_wishes_character
14+
SET timestamp = timestamp + INTERVAL '7 hours'
15+
WHERE uid >= 700000000 AND uid < 800000000 AND official;
16+
17+
UPDATE gi_wishes_weapon
18+
SET timestamp = timestamp + INTERVAL '7 hours'
19+
WHERE uid >= 700000000 AND uid < 800000000 AND official;
20+
21+
UPDATE gi_wishes_chronicled
22+
SET timestamp = timestamp + INTERVAL '7 hours'
23+
WHERE uid >= 700000000 AND uid < 800000000 AND official;

src/api/gi/wishes_import/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ async fn import_wishes(
355355

356356
let region_time_zone = match gacha_log.data.region.as_str() {
357357
"os_usa" => -5,
358-
"os_eu" => 1,
358+
"os_euro" => 1,
359359
_ => 8,
360360
};
361361

0 commit comments

Comments
 (0)