core: fix contest_edit timezone convert

This commit is contained in:
undefined committed 2022-10-24 02:57:12 +08:00
1 parent 0c587d1786
commit c00c2160ec
7 files changed
+22 -23

No files matched your search

+1 -3
View File
@@ -10,9 +10,6 @@ declare global {
interface ArrayConstructor {
isDiff: (a: any[], b: any[]) => boolean;
}
interface Date {
format: (fmt?: string) => string;
}
interface Math {
sum: (...args: Array<number[] | number>) => number;
}
@@ -75,6 +72,7 @@ Array.isDiff = function isDiff(a, b) {
return false;
};
// @ts-ignore
Date.prototype.format = function formatDate(fmt = '%Y-%m-%d %H:%M:%S') {
let m = this.getMonth() + 1;
if (m < 10) m = `0${m}`;