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

decimal_date doesn't handle daylight savings time boundaries. #450

Closed
jasonelaw opened this issue Jul 28, 2016 · 0 comments · Fixed by #455
Closed

decimal_date doesn't handle daylight savings time boundaries. #450

jasonelaw opened this issue Jul 28, 2016 · 0 comments · Fixed by #455

Comments

@jasonelaw
Copy link
Contributor

The decimal_date function doesn't seem to handle daylight savings time boundaries correctly.

> date4 <- ymd_hms("2016-03-13 01:00:00", tz = 'America/New_York')
> date4        <- date4 + dhours(-1:1)
> decimal4     <- decimal_date(date4)
> diff(decimal4)
[1] 0.0001138434 0.0002276867

The times above are a fixed hour apart however the decimal_date function ignores the tz information. Not sure this is intentional but it doesn't seem necessary unless I'm missing something.

I've fixed the issue in my fork and and wrote a couple tests. All tests in test-decimal-date passed. I'll issue a pull request shortly.

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 a pull request may close this issue.

1 participant