Skip to content

Commit 29f13d9

Browse files
committed
Make only Quiz web events server-time dependent
1 parent bc9d3e5 commit 29f13d9

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/data/events.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
{
2121
"name": "\"A Thousand Questions With Paimon\" Quiz Event",
22-
"type": "Web",
22+
"type": "Quiz",
2323
"link": "https://www.hoyolab.com/article/283665",
2424
"img": "https://upload-os-bbs.hoyolab.com/upload/2021/04/02/1015537/7d8d1ce3d75fd164173f9a5fad1fce11_1945247609127083405.png",
2525
"start": "2021-04-06 13:00:00",
@@ -331,7 +331,7 @@
331331
},
332332
{
333333
"name": "\"A Thousand Questions With Paimon\" Quiz Event",
334-
"type": "Web",
334+
"type": "Quiz",
335335
"link": "https://www.hoyolab.com/article/483165",
336336
"img": "https://upload-os-bbs.hoyolab.com/upload/2021/06/25/1015537/7737ee0cf2b2a0988f6f4758aeaf23fa_1459343022654549496.png",
337337
"start": "2021-06-25 13:00:00",
@@ -465,7 +465,7 @@
465465
},
466466
{
467467
"name": "\"A Thousand Questions With Paimon\" Quiz Event",
468-
"type": "Web",
468+
"type": "Quiz",
469469
"link": "https://www.hoyolab.com/article/766048",
470470
"img": "https://upload-os-bbs.hoyolab.com/upload/2021/08/27/1015537/3cf6ef0726d942d61d2825f88fd16820_953882758451226433.jpg",
471471
"start": "2021-08-27 13:00:00",
@@ -730,7 +730,7 @@
730730
},
731731
{
732732
"name": "\"A Thousand Questions With Paimon\" Quiz Event",
733-
"type": "Web",
733+
"type": "Quiz",
734734
"link": "https://www.hoyolab.com/article/1419212",
735735
"img": "https://upload-os-bbs.hoyolab.com/upload/2021/11/16/1015537/870f1a8b2a817620fc1d5f05fa46178f_5388840515738343619.jpg",
736736
"start": "2021-11-19 13:00:00",

src/utils/Types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ export interface Event {
570570

571571
export enum EventType {
572572
Web = "Web",
573+
Quiz = "Quiz",
573574
InGame = "In-game",
574575
Maintenance = "Maintenance",
575576
Stream = "Stream",

src/utils/Utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export function getStartTime(event: Event, serverTimezone: string) {
194194
}
195195

196196
export function isServerTimeEnd(event: Event) {
197-
return event.end_server ?? (event.type == EventType.Banner || event.type == EventType.InGame || event.type == EventType.Web)
197+
return event.end_server ?? (event.type == EventType.Banner || event.type == EventType.InGame || event.type == EventType.Quiz)
198198
}
199199
export function getEndTime(event: Event, serverTimezone: string) {
200200
return event.end != undefined && getDate(event.end, event.timezone ?? (isServerTimeEnd(event) ? serverTimezone : undefined))

0 commit comments

Comments
 (0)