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

Maybe the lease maintenance code compares datetimes in the local timezone against lease expiration times in UTC #385

Open
exarkun opened this issue May 20, 2022 · 1 comment

Comments

@exarkun
Copy link
Collaborator

exarkun commented May 20, 2022

This would lead to a slight miscalculation in when it is necessary to renew leases (early on one side of UTC and tardy on the other).

VoucherStore was recently changed to use UTC-aware datetimes but the lease maintenance code still uses datetime.utcfromtimestamp with reactor.seconds() and the stored lease expiration time as arguments. It's not immediately obvious to me whether these are correct or not.

@meejah
Copy link
Collaborator

meejah commented May 20, 2022

reactor.seconds() is from the system time? And at least on Linux that is UTC. No idea what windows will do.
(Do we have to use reactor.seconds() there, or can we just use aware_now() as well so we don't have to think about this again?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants