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
Date.to_secs
does not take timezone into account.
#24
Comments
For anyone that may want to help tackle this, if you find yourself making any code changes to the Timezone.* modules, ping me first. |
Looking at the code this probably is also a bug in to_days, although you'd need to look a lot harder to find a specific example. |
I made a first pass at this problem by writing a test that fails and a simple solution, however it seems to be causing problems in other code. Date.to_secs is fundamental to many other functions and I may be running into chicken and egg issues. The code is here if you want to look, will keep plugging away as I have time. |
This patch resolves the bug. No changes to the Timezone code were required, but other methods in Date required some reworking to adapt to the changes in to_secs. |
Merged and published as part of the 0.13.3 release. Thanks! Do you happen to know which functions specifically required rework? I can dig through and find out, but if you know offhand, then I can open a new issue to track that. |
Date.shift and Date.compare On Fri, Jan 9, 2015 at 4:28 PM, Paul Schoenfelder notifications@github.com
|
Oh and Date.diff On Fri, Jan 9, 2015 at 4:37 PM, Booker Bense bbense@gmail.com wrote:
|
@bbense Excellent, thank you sir! Might be a good place to start if you are looking for another issue to tackle. I'll cc you on it when I create it, you can decide whether you want to work that one or not. |
Example symptom:
Current implementation of
Date.to_secs
(timex/lib/date/date.ex
Lines 377 to 379 in b7b7a79
The text was updated successfully, but these errors were encountered: