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

Embed go timezone database in Windows build #8892

Closed
malcom opened this issue Aug 14, 2021 · 4 comments
Closed

Embed go timezone database in Windows build #8892

malcom opened this issue Aug 14, 2021 · 4 comments
Milestone

Comments

@malcom
Copy link

@malcom malcom commented Aug 14, 2021

Hugo87 with specified timeZone in config exit on Windows with msg:

Error: invalid timeZone for language "en": The system cannot find the path specified.

This is a known problem with golang time lib on Windows (golang/go#21881, golang/go#38453) with missing zoneinfo.zip file.

User workaround for this problem could be:

  • extract zoneinfo.zip file from golang distribution and set the path for it in env %ZONEINFO%
  • install golang distribution

But, it seems a much better solution would be to embed the binary content of this file when building the windows version. Package tzdata provides an embedded copy of the timezone database.

@bep bep added Enhancement and removed Proposal labels Aug 14, 2021
@bep bep added this to the v0.88 milestone Aug 14, 2021
bep added a commit that referenced this issue Aug 14, 2021
Updates #8892
@bep
Copy link
Member

@bep bep commented Aug 14, 2021

One learns something new every day. We have tests that run on Windows, but those servers all have Go installed.

I have pushed a fix for this, a fix I don't have any easy way to verify myself. I assume it will work, but it would be good if someone could chime in and tell me that it works.

@malcom
Copy link
Author

@malcom malcom commented Aug 14, 2021

I could test, but I'm not a Go programmer, so if you provide the v0.88-dev build, I'll check on Win7 and 10.

@bep
Copy link
Member

@bep bep commented Aug 14, 2021

hugo088.exe.zip

@malcom attached is the dev build (extended version) for Windows.

@malcom
Copy link
Author

@malcom malcom commented Aug 14, 2021

I tested and confirm that it works correctly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants