fix(server): 业务日期'今天'统一为中国日期,避免凌晨 UTC 偏一天

joinDate/leaveDate/checkInDate/sync 起始日等业务日期默认值原来用
dayjs().utc()(UTC 今天),在国内 00:00-07:59 会取到昨天。
统一改为 dayjs().utcOffset(8)(固定 UTC+8 中国日期),与考勤周边界
修复保持一致;pending-tasks/controller-base 的本地 dayjs() 也显式化。
This commit is contained in:
2026-08-08 17:58:16 +08:00
parent 782b43ef0a
commit 7905f1ee23
8 changed files with 11 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ export abstract class AttendanceControllerBase {
) {}
protected getTodayDateOnly(): string {
return dayjs().format('YYYY-MM-DD');
return dayjs().utcOffset(8).format('YYYY-MM-DD');
}
protected canManageAllAttendance(req: { user: RequestUser }): boolean {