1.7 KiB
1.7 KiB
R3.3 任务报告
结果
通过 Sub2API 受控 CLI 精确查询了北京时间 2026-07-14 17:00:00 至 18:00:00 的活跃非管理员用户。该窗口按 Asia/Shanghai 转换为 UTC 2026-07-14T09:00:00Z 至 2026-07-14T10:00:00Z,使用半开区间 [start,end)。
共选中 7 名用户:
| 邮箱 | 用户 ID | 请求数 |
|---|---|---|
| MacRsh@test.com | 11 | 1 |
| huiguo@test.com | 15 | 31 |
| hyglql@test.com | 10 | 126 |
| laogen@test.com | 7 | 158 |
| mail0795336304@163.com | 22 | 26 |
| yinl0801@qq.com | 19 | 3 |
| zhuo@test.com | 16 | 35 |
CLI 改进
- owning YAML
config/platform-infra/sub2api-codex-pool.yaml#credits.timezone新增默认时区Asia/Shanghai。 credits grant新增通用--active-start/--active-end精确时间窗。- 未带偏移的 ISO 时间由 CLI 按 YAML IANA 时区换算为 UTC;本地与 UTC 边界同时披露。
- 远端继续使用 Sub2API 原生 admin usage 和用户 API,并按 UTC 半开区间逐条过滤。
- PK01 旧 Python 缺少
zoneinfo,因此时区换算在 Bun/Intl 控制面完成,远端只接收已验证 UTC 边界。
实现通过 PR #2117 合并,merge commit 为 7b43da1ab842183d36476e174e17fb7f45891b57。
验证
bun --check scripts/src/platform-infra-sub2api-codex/credits.ts:通过。bun --check scripts/src/platform-infra-sub2api-codex/config.ts:通过。git diff --check:通过。- PK01 原入口 dry-run:
ok=true、selection=active-window、selected=7。 - 写入证据:
mutation=false、writeAttempted=0、writeSucceeded=0。
没有执行充值,没有修改 Sub2API 源码、版本、哨兵或运行面配置。