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

feat(stdlib): added timezone support to hourSelection function #4757

Merged
merged 3 commits into from
May 16, 2022

Conversation

skartikey
Copy link
Contributor

issue - hourSelection() function not respecting timezone setting

fixes: influxdata/EAR#3213

Done checklist

  • docs/SPEC.md updated
  • Test cases written

@skartikey skartikey requested review from a team as code owners May 16, 2022 12:02
@skartikey skartikey requested review from wolffcm and noramullen1 and removed request for a team May 16, 2022 12:02
Copy link

@wolffcm wolffcm left a 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.

}

return name.Str(), offset.Duration(), nil
}
Copy link

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)
}
Copy link

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.

@skartikey skartikey force-pushed the skartikey-flux-hour-selection-timezone branch from f2bdd0f to e668300 Compare May 16, 2022 18:28
skartikey added 2 commits May 16, 2022 20:08
issue - hourSelection() function not respecting timezone setting

fixes: influxdata/EAR#3213
@skartikey skartikey marked this pull request as draft May 16, 2022 19:15
@skartikey skartikey force-pushed the skartikey-flux-hour-selection-timezone branch from e668300 to 7eeac7a Compare May 16, 2022 19:27
@skartikey skartikey marked this pull request as ready for review May 16, 2022 19:42
@skartikey skartikey requested a review from wolffcm May 16, 2022 19:42
@skartikey skartikey merged commit fac6ffb into master May 16, 2022
@skartikey skartikey deleted the skartikey-flux-hour-selection-timezone branch May 16, 2022 20:52
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