Merge pull request #242 from nightcp/fix-report-sign-repeat

This commit is contained in:
kuaifan 2025-01-04 20:48:09 +08:00 committed by GitHub
commit 1cb0cdf540
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,12 +139,12 @@ class Report extends AbstractModel
// 如果设置了周期偏移量
empty( $offset ) || $now_dt->subWeeks( abs( $offset ) );
$now_dt->startOfWeek(); // 设置为当周第一天
return $now_dt->year . $now_dt->weekOfYear;
return now()->year . $now_dt->weekOfYear;
},
Report::DAILY => function() use ($now_dt, $offset) {
// 如果设置了周期偏移量
empty( $offset ) || $now_dt->subDays( abs( $offset ) );
return $now_dt->format("Ymd");
return now()->format("Ymd");
},
default => "",
};