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

Make beginning_of_month return the first of the month in the correct timezone #450

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

mtrudel
Copy link
Contributor

@mtrudel mtrudel commented Jul 30, 2018

Summary of changes

Takes the time_offset of the beginning of the month into account when computing beginning_of_month. Fixes an issue whereby beginning_of_month called with e.g. 13:45 15 Nov 2018 EST would return 00:00 1 Nov 2018 EST where it should be 00:00 1 Nov 2018 EDT since the Eastern timezone was still in daylight savings on 1 Nov.

Note that other {beginning,end}_of_{day,week,month} functions already do the right thing - the implementation of this method was the outlier.

Checklist

  • New functions have typespecs, changed functions were updated
  • Same for documentation, including moduledocs
  • Tests were added or updated to cover changes
  • Commits were squashed into a single coherent commit

@coveralls
Copy link

coveralls commented Jul 30, 2018

Coverage Status

Coverage increased (+2.7%) to 72.561% when pulling 4771fad on mtrudel:master into ea3cd35 on bitwalker:master.

@bitwalker bitwalker merged commit f2335e0 into bitwalker:master Aug 8, 2018
@bitwalker
Copy link
Owner

Thanks!

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.

3 participants