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

Adjust timestamp-difference to address DST boundary #6

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

leetayres
Copy link

With the current implementation of local-time, the timestamp-duration+ and timestamp-duration- operations will adjust the resulting timestamp is on the other side of a DST boundary. However timestamp-difference does not take DST into account. This results in the following, which feels inconsistent to me.

(test-diff @2014-11-02T00:00:00.000000-05:00 @2014-11-03T00:00:00.000000-06:00)
@2014-11-03T01:00:00.000000-06:00
(test-diff @2015-03-08T00:00:00.000000-06:00 @2015-03-09T00:00:00.000000-05:00)
@2015-03-08T23:00:00.000000-05:00

After the proposed change the results are as follows:

(test-diff @2014-11-02T00:00:00.000000-05:00 @2014-11-03T00:00:00.000000-06:00)
@2014-11-03T00:00:00.000000-06:00
(test-diff @2015-03-08T00:00:00.000000-06:00 @2015-03-09T00:00:00.000000-05:00)
@2015-03-09T00:00:00.000000-05:00

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.

1 participant