update 30days by OpenCode

This commit is contained in:
2026-07-02 16:15:42 +07:00
parent c7e6ccd717
commit c570215af3
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -568,6 +568,8 @@ def range_bounds(name):
start = now - dt.timedelta(hours=24)
elif name == "7d":
start = now - dt.timedelta(days=7)
elif name == "30d":
start = now - dt.timedelta(days=30)
else:
start = now.replace(hour=0, minute=0, second=0, microsecond=0)
return start.astimezone(dt.timezone.utc).timestamp(), now.astimezone(dt.timezone.utc).timestamp()
@@ -817,7 +819,7 @@ def main():
quota_p = sub.add_parser("quota", help="Show current quota snapshots")
quota_p.add_argument("--force", action="store_true")
report_p = sub.add_parser("report", help="Print usage summary as JSON")
report_p.add_argument("range", choices=["today", "1h", "5h", "24h", "7d"])
report_p.add_argument("range", choices=["today", "1h", "5h", "24h", "7d", "30d"])
args = parser.parse_args()
if args.cmd == "init":
init_db()