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

RateLimiter will possibly behave unexpectedly during a DST time change #40

Open
PeterJarrettUK opened this issue Sep 14, 2023 · 0 comments

Comments

@PeterJarrettUK
Copy link

Hi,

Looking in TimeSystem.cs in ITime.GetNow at line 22 it's using DateTime.Now, but if the code is running in an environment where the clocks change from DST to non-DST then DateTime.Now will suddenly return 1 hour before - and vice versa if the clocks go forward.

So I think (and please do just say if I'm misreading the code!) that if a longer running delay is active at the point when the clocks change, that the limiter might return early, OR very very late.

Perhaps a straight switch to DateTime.UtcNow would resolve this?

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

No branches or pull requests

1 participant