|
|
@@ -16,7 +16,7 @@ import logging
|
|
|
import os
|
|
|
import sys
|
|
|
import uuid
|
|
|
-from datetime import datetime
|
|
|
+from datetime import datetime, timedelta
|
|
|
from decimal import Decimal, ROUND_HALF_UP
|
|
|
from pathlib import Path
|
|
|
from typing import Optional
|
|
|
@@ -278,7 +278,7 @@ async def scheduled_tick():
|
|
|
if day_limit_coast is not None:
|
|
|
now_local = datetime.now(SCHEDULER_TZ)
|
|
|
day_start = now_local.replace(hour=0, minute=0, second=0, microsecond=0)
|
|
|
- day_end = day_start.replace(day=day_start.day + 1)
|
|
|
+ day_end = day_start + timedelta(days=1)
|
|
|
|
|
|
used_today = get_total_token_coast_between(day_start, day_end)
|
|
|
if used_today >= day_limit_coast:
|