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

Check AsTime vs local timezone #8843

Closed
bep opened this issue Aug 3, 2021 · 1 comment
Closed

Check AsTime vs local timezone #8843

bep opened this issue Aug 3, 2021 · 1 comment
Assignees
Milestone

Comments

@bep
Copy link
Member

@bep bep commented Aug 3, 2021

https://discourse.gohugo.io/t/mage-v-check-error/34066

@bep bep added the Bug label Aug 3, 2021
@bep bep added this to the v0.87 milestone Aug 3, 2021
@bep bep self-assigned this Aug 3, 2021
@bep bep added the Upstream label Aug 3, 2021
@bep bep closed this Aug 3, 2021
@bep bep reopened this Aug 3, 2021
@bep
Copy link
Member Author

@bep bep commented Aug 3, 2021

OK, @jmooring -- I have checked your test failure, and that comes from the behaviour of time.Parse:

// When parsing a time with a zone offset like -0700, if the offset corresponds
// to a time zone used by the current location (Local), then Parse uses that
// location and zone in the returned time. Otherwise it records the time as
// being in a fabricated location with time fixed at the given zone offset.

The reason this passed earlier was that we used time.ParseInLocation, but that has its own set of worse issues:

spf13/cast#80 (comment)

I'm going to fix this by adjusting the tests ... Shout if you disagree.

bep added a commit to bep/hugo that referenced this issue Aug 3, 2021
Closes gohugoio#8843
bep added a commit to bep/hugo that referenced this issue Aug 3, 2021
Closes gohugoio#8843
bep added a commit to bep/hugo that referenced this issue Aug 3, 2021
Closes gohugoio#8843
@bep bep closed this in 9ff17c3 Aug 3, 2021
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.

1 participant