fix: timezone issues

This commit is contained in:
zkldi
2022-12-18 23:52:14 +00:00
parent 695d028a8a
commit 9a2eae3f7e
3 changed files with 15 additions and 3 deletions
@@ -1,5 +1,6 @@
import { ConverterAPICGMuseca } from "./converter";
import CreateLogCtx from "lib/logger/logger";
import { ParseDateFromString } from "lib/score-import/framework/common/score-utils";
import t from "tap";
import { dmf } from "test-utils/misc";
import type { CGContext, CGMusecaScore } from "../types";
@@ -31,7 +32,10 @@ function mkOutput(modifant: any = {}): DryScore<"museca:Single"> {
comment: null,
game: "museca",
importType: "api/cg-dev-museca",
timeAchieved: 1559805262000,
// we handle it like this because -- with no timezone info
// this will fail in CI; it has a different timezone there!
timeAchieved: ParseDateFromString("2019-06-06 08:14:22"),
service: "CG Dev",
scoreData: {
grade: "優",
@@ -1,5 +1,6 @@
import { ConverterAPICGPopn } from "./converter";
import CreateLogCtx from "lib/logger/logger";
import { ParseDateFromString } from "lib/score-import/framework/common/score-utils";
import t from "tap";
import { dmf } from "test-utils/misc";
import type { CGContext, CGPopnScore } from "../types";
@@ -30,7 +31,10 @@ function mkOutput(modifant: any = {}): DryScore<"popn:9B"> {
comment: null,
game: "popn",
importType: "api/cg-dev-popn",
timeAchieved: 1559805262000,
// we handle it like this because -- with no timezone info
// this will fail in CI; it has a different timezone there!
timeAchieved: ParseDateFromString("2019-06-06 08:14:22"),
service: "CG Dev",
scoreData: {
grade: "A",
@@ -1,5 +1,6 @@
import { ConverterAPICGSDVX } from "./converter";
import CreateLogCtx from "lib/logger/logger";
import { ParseDateFromString } from "lib/score-import/framework/common/score-utils";
import t from "tap";
import { dmf } from "test-utils/misc";
import type { CGContext, CGSDVXScore } from "../types";
@@ -32,7 +33,10 @@ function mkOutput(modifant: any = {}): DryScore<"sdvx:Single"> {
comment: null,
game: "sdvx",
importType: "api/cg-dev-sdvx",
timeAchieved: 1559805262000,
// we handle it like this because -- with no timezone info
// this will fail in CI; it has a different timezone there!
timeAchieved: ParseDateFromString("2019-06-06 08:14:22"),
service: "CG Dev",
scoreData: {
grade: "A+",