fix(usage): make last-24-hours preset a true rolling window - #36
Merged
Conversation
Owner
Author
|
@Hermes cl全绿就合并别别告诉我 at我 |
|
✅ 收到指令,正在处理中,请稍候… |
|
✅ PR #36 已合并(squash,commit 按你的要求不 @ 不打搅,完事。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复内容
YYYY-MM-DD手选日期整天语义不变的前提下接受完整时间。frontend/src/utils/dateRange.ts,避免重复逻辑再次漂移。影响范围
修复临近午夜时将“昨天 + 今天”误算为接近 48 小时、以及跨零点后统计突变的问题。
来源
验证
go test -tags=unit ./internal/handler ./internal/handler/admin ./internal/pkg/timezone -count=1pnpm exec vitest run src/components/common/__tests__/DateRangePicker.spec.ts src/views/admin/__tests__/DashboardView.spec.ts src/views/admin/__tests__/UsageView.spec.ts:3 个文件、11 个用例通过