4th_fix time error

This commit is contained in:
beabigegg
2025-09-03 09:05:51 +08:00
parent e6e5332705
commit cce3fd4925
26 changed files with 2551 additions and 82 deletions

View File

@@ -11,6 +11,7 @@ Modified: 2024-01-28
from datetime import datetime, timedelta
from sqlalchemy.sql import func
from app import db
from app.utils.timezone import format_taiwan_time
class APIUsageStats(db.Model):
@@ -51,7 +52,7 @@ class APIUsageStats(db.Model):
'response_time_ms': self.response_time_ms,
'success': self.success,
'error_message': self.error_message,
'created_at': self.created_at.isoformat() if self.created_at else None
'created_at': format_taiwan_time(self.created_at, "%Y-%m-%d %H:%M:%S") if self.created_at else None
}
@classmethod