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

Timezone switch bug #14

Open
MirkoBonadei opened this issue Nov 2, 2016 · 0 comments
Open

Timezone switch bug #14

MirkoBonadei opened this issue Nov 2, 2016 · 0 comments
Labels

Comments

@MirkoBonadei
Copy link
Contributor

The function \Recruiter\RetryPolicy\TimeTable::estimateHowManyRetriesIn assumes that the default timezone is UTC (which should be the best practice).

In case the default timezone is different than UTC (please refer to date_default_timezone_get() to known the default time zone of your PHP runtime) the estimateHowManyRetriesIn will fall in a subtle bug which causes a time travel in the future when an amount of time is subtracted from another instance of time (at [1] you can read one of the many reports about this bug).

Please note that supporting only UTC is a good idea. Maybe we should just check the result of the function date_default_timezone_get and if it is different from UTC we should throw an exception.

[1] - https://bugs.php.net/bug.php?id=68286

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

No branches or pull requests

1 participant