Skip to content

fduty: pass timezone on automation create and update - #212

Merged
ysyneu merged 3 commits into
mainfrom
feat/automation-schedule-timezone
Oct 9, 2026
Merged

ysyneu merged 3 commits into
mainfrom
feat/automation-schedule-timezone

Conversation

@debidong

@debidong debidong commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

做了什么

fduty automation create 和 fduty automation update 可以传 --timezone。不传时,创建仍走成员、账号、Asia/Shanghai;更新保持原来的时区,包括老数据里的空串。更新时显式传空字符串,会写成 UTC,不会改回账号默认。

fduty safari automation-rule-update 的生成参数里也有 --timezone。技能说明要求:用户点名了时区才传这个参数;更新之后读回 schedule_next_fire_at_ms,不要假设原来排好的那一次还会跑。

依赖 SDK:flashcatcloud/go-flashduty#91 (AutomationRuleUpdateRequest.Timezone)。

怎么验证

go test -count=1 ./internal/cli/ ./internal/skilldoc/ ./internal/cmd/skilldoc/ ./internal/cmd/cligen/

Requires go-flashduty AutomationRuleUpdateRequest.Timezone from
automation: accept timezone on rule update. go.mod stays on v0.15.10
until that commit is fetched.
The create and update commands set AutomationRuleUpdateRequest.Timezone.
That field is on go-flashduty 7a88b4a, which is not in a release tag yet.
Point go-flashduty at 26910a1 so --timezone and the incident custom-field map both compile.
@ysyneu
ysyneu merged commit 490552b into main Oct 9, 2026
12 checks passed
@ysyneu
ysyneu deleted the feat/automation-schedule-timezone branch October 9, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants