移除 setLocalHours
This commit is contained in:
@@ -2,7 +2,7 @@ import { FrontendOrBackendSession, pinus } from 'pinus';
|
||||
import { getGamedata } from '../pubUtils/gamedata';
|
||||
import EventRecord, { EventRecordModel } from '../db/EventRecord';
|
||||
import { RoleModel } from '../db/Role';
|
||||
import { genCode, decodeStrSingle, decodeStr, getRandomWithWeight, resResult, setLocalHours } from '../pubUtils/util';
|
||||
import { genCode, decodeStrSingle, decodeStr, getRandomWithWeight, resResult } from '../pubUtils/util';
|
||||
import { EVENT_STATUS, EVENT_RECORD_STATUS, EVENT_TYPE, EVENT_RANDOM_TYPE_ONE_OPEN, EVENT_QUIZ_NUM, EVENT_ANSWER_STATUS, FUNCS_ID } from '../consts';
|
||||
import { EVENT_REFRESH_NUM } from '../consts';
|
||||
import { STATUS } from '../consts/statusCode';
|
||||
@@ -61,8 +61,8 @@ export async function setBattleStatus(session: FrontendOrBackendSession, roleId:
|
||||
*/
|
||||
export function getEventTime(now: Date) {
|
||||
let curTime = Number(now);
|
||||
let todayA = setLocalHours(12, now); // 每天12点
|
||||
let todayB = setLocalHours(18, now); // 每天18点
|
||||
let todayA = now.setHours(12, 0, 0, 0); // 每天12点
|
||||
let todayB = now.setHours(18, 0, 0, 0); // 每天18点
|
||||
let yesterdayB = todayB - 86400000; // 前一天12点
|
||||
let t = 0;
|
||||
if(curTime < todayA) {
|
||||
|
||||
Reference in New Issue
Block a user