-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat(stdlib): added timezone support to hourSelection function #4757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to avoid copying and pasting code if we can. Looks good otherwise.
stdlib/universe/hour_selection.go
Outdated
} | ||
|
||
return name.Str(), offset.Duration(), nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this copied and pasted from a function in the date
package? Maybe that function could just be exported?
) | ||
|
||
testing.diff(got: got, want: want) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I checked that 2018-12-19T18:11:35Z
is within the 9-10 range in LA time, and it turns out that is 10:11 in LA time. But the semantics of hourSelection
is that the stop
hour is inclusive. This was a surprise to me! So this looks good.
f2bdd0f
to
e668300
Compare
issue - hourSelection() function not respecting timezone setting
fixes: influxdata/EAR#3213
e668300
to
7eeac7a
Compare
issue - hourSelection() function not respecting timezone setting
fixes: influxdata/EAR#3213
Done checklist