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
@@ -252,10 +252,11 @@ def recharge(
|
||||
|
||||
|
||||
def _format_cst_time(dt_value):
|
||||
"""Format datetime to CST ISO string. Input is UTC naive datetime from DB."""
|
||||
"""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
|
||||
# DB stores UTC naive datetime, convert to CST
|
||||
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