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

fix: shift_dst ON the DST hour #306

Closed
wants to merge 1 commit into from

Conversation

Matsa59
Copy link
Contributor

@Matsa59 Matsa59 commented Feb 28, 2024

We encounter the same bug as explains in #304

The problem is caused because the validation rule system call multiple times the shift_dst function. So it applied multiple time the shift.

A simple solution is to check if the shift date have the same hour (in that case, we may want to apply dst)

--

btw sorry I had to update excoverall dunno why got ssl error on my mac
and also bus error on otp 25 so I just bump it to otp 26 (we use it in production at Omerlo for a while so IMO it's safe)

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.60%. Comparing base (80b7c93) to head (a11b337).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #306   +/-   ##
=======================================
  Coverage   96.59%   96.60%           
=======================================
  Files          21       21           
  Lines         499      500    +1     
=======================================
+ Hits          482      483    +1     
  Misses         17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Matsa59
Copy link
Contributor Author

Matsa59 commented Feb 28, 2024

hum it may have a counter part : if the schedule rule is next hour it may not work.
But I guess it's better than an infinite loop

@Matsa59 Matsa59 marked this pull request as draft March 4, 2024 10:47
@Matsa59
Copy link
Contributor Author

Matsa59 commented Mar 4, 2024

Ok there is a problem on day change (e.g. DST on midnight will change date to day - 1)
I'll work on that today

@Matsa59
Copy link
Contributor Author

Matsa59 commented Mar 12, 2024

So here the bad news: the base system should use date instead of datetime :/

@Matsa59 Matsa59 closed this Apr 23, 2024
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.

None yet

1 participant