fix(cron): fix timezone display bug, add tz validation and skill docs
This commit is contained in:
1 parent
2c3a568e46
commit
6bae6a617f
5 files changed
+24
-13
No files matched your search
@@ -99,6 +99,12 @@ class CronTool(Tool):
|
||||
return "Error: no session context (channel/chat_id)"
|
||||
if tz and not cron_expr:
|
||||
return "Error: tz can only be used with cron_expr"
|
||||
if tz:
|
||||
from zoneinfo import ZoneInfo
|
||||
try:
|
||||
ZoneInfo(tz)
|
||||
except (KeyError, Exception):
|
||||
return f"Error: unknown timezone '{tz}'"
|
||||
|
||||
# Build schedule
|
||||
delete_after = False
|
||||
|
||||
Reference in new issue
Block a user