-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make Time_System_Timezone
properly detect daylight savings
#9201
Conversation
Previously, this code did not declare ambiguous dst. This meant `mktime` wasn't doing what was intended; we actually want `mktime` to determine whether DST applies or not. Signed-off-by: braydonk <braydonk@google.com>
The example data in these tests weren't actually accurate to the desired output. This commit refactors the tests to use correct data, and to switch to a table-test setup to allow easily specifying new test cases in the future. Signed-off-by: braydonk <braydonk@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a deviation from the previous behavior and even though I don't have any experience with it, this stackoverflow response seems to make a compelling argument against it.
I don't mean to block this PR, on the contrary, I want someone with more experience to take a look at it and make an educated (and hopefully conservative) choice.
I personally think we should add a new option that users have to explicitly enable to switch the historic behavior but I understand that I could be wrong and an argument could be made about "the issue of adding an option each time we change a default behavior" so I urge others to get involved.
The reason I selected "request changes" was just so there is a visual cue to anyone else reviewing this so they pay attention to the potential issue.
Edit: It was brought to my attention that this was already discussed so there's no need to hold this PR.
For posterity, I'll put here what I originally would have responded.
I saw this post as well. It makes a good point, and also shows that in the PR description when I say "prompts When In the previous version, the bug was that the original All this to say that I think this falls under a behaviour fix rather than a behaviour change; the original intention of this feature was to treat DST status as unknown and let Apologies to anyone who was affected by this bug while it was in place. |
Previously,
Time_System_Timezone
would not work for timezone specifications likeAmerica/Toronto
orEST5EDT
because I neglected to settm_isdst
to-1
, which promptsmktime
to detect daylight savings time on its own.This PR addresses this issue, and fixes the test data which was previously incorrect due to the existence of this bug.
#9197
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.