Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time zone data for Windows #18578

Closed
wizpresso-steve-cy-fan opened this issue Sep 26, 2023 · 2 comments · Fixed by #18676
Closed

Add time zone data for Windows #18578

wizpresso-steve-cy-fan opened this issue Sep 26, 2023 · 2 comments · Fixed by #18676
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/platform-windows type/enhancement

Comments

@wizpresso-steve-cy-fan
Copy link

Proposal

Due to golang/go#38453, specifying time zone for periodic job is actually broken in Windows, which will promptly fail the periodic job:

nomad/api/jobs.go

Lines 897 to 903 in 20eadc7

func (p *PeriodicConfig) GetLocation() (*time.Location, error) {
if p.TimeZone == nil || *p.TimeZone == "" {
return time.UTC, nil
}
return time.LoadLocation(*p.TimeZone)
}

Use-cases

For periodic job.

Attempted Solutions

Use Local time.

periodic {
  cron             = "@hourly"
  time_zone        = "Local"
}
@wizpresso-steve-cy-fan
Copy link
Author

golang/go#38017

There are two ways to do this.

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Sep 26, 2023
@lgfa29
Copy link
Contributor

lgfa29 commented Oct 5, 2023

Thanks for the report @wizpresso-steve-cy-fan!

I've opened #18676 to add the timetzdata build flag on Windows so the time zone data is embedded into the binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/platform-windows type/enhancement
Projects
Development

Successfully merging a pull request may close this issue.

2 participants