fix: Token timezone display + Skill install/uninstall bugs
This commit is contained in:
1 parent
5a7c717b25
commit
251bbc4123
3 files changed
+18
-16
No files matched your search
@@ -85,12 +85,14 @@ async def get_recent_logs(
|
||||
|
||||
|
||||
def _format_cst(dt_value):
|
||||
"""Format UTC naive datetime to CST ISO string"""
|
||||
"""Format datetime to CST ISO string.
|
||||
DB values are written by cst_now() as CST time (stored naive by MySQL).
|
||||
No UTC conversion needed - treat naive values as CST directly.
|
||||
"""
|
||||
if dt_value is None:
|
||||
return None
|
||||
utc_dt = dt_value.replace(tzinfo=timezone.utc)
|
||||
cst_dt = utc_dt.astimezone(CST_TZ)
|
||||
return cst_dt.isoformat()
|
||||
# DB naive values are already CST (written by cst_now()), just attach tz
|
||||
return dt_value.replace(tzinfo=CST_TZ).isoformat()
|
||||
|
||||
@router.get("/recent-audit")
|
||||
async def get_recent_audit(
|
||||
@@ -117,9 +119,11 @@ async def get_recent_audit(
|
||||
|
||||
|
||||
def _format_cst(dt_value):
|
||||
"""Format UTC naive datetime to CST ISO string"""
|
||||
"""Format datetime to CST ISO string.
|
||||
DB values are written by cst_now() as CST time (stored naive by MySQL).
|
||||
No UTC conversion needed - treat naive values as CST directly.
|
||||
"""
|
||||
if dt_value is None:
|
||||
return None
|
||||
utc_dt = dt_value.replace(tzinfo=timezone.utc)
|
||||
cst_dt = utc_dt.astimezone(CST_TZ)
|
||||
return cst_dt.isoformat()
|
||||
# DB naive values are already CST (written by cst_now()), just attach tz
|
||||
return dt_value.replace(tzinfo=CST_TZ).isoformat()
|
||||
Reference in new issue
Block a user