fix: the day has come

This commit is contained in:
c43721 2022-07-12 01:31:59 +00:00 committed by GitHub
parent 3e5a8ae54d
commit d18176fa71
2 changed files with 2 additions and 4 deletions

View file

@ -39,7 +39,6 @@
"dependencies": {
"cheerio": "^1.0.0-rc.10",
"compressjs": "^1.0.2",
"date-fns": "^2.28.0",
"gbxremote": "^0.2.1",
"got": "^12.0.3",
"iconv-lite": "^0.6.3",

View file

@ -1,5 +1,4 @@
const { format } = require('date-fns'),
Core = require('./core');
const Core = require('./core');
class OpenTtd extends Core {
async run(state) {
@ -116,7 +115,7 @@ class OpenTtd extends Core {
const temp = new Date(0,0,1);
temp.setFullYear(0);
temp.setDate(daysSinceZero+1);
return format(temp, 'YYYY-MM-DD');
return date.toISOString().split('T')[0];
}
decode(num,arr) {