-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: fix time zone offsets being dropped on Windows (#6368)
* parser: add test for time zones This adds a unit test for parsing logs that contain time stamps with a time zone offset. This test deliberately fails on Windows; a subsequent commit fixes the underlying issue and makes the test pass. Signed-off-by: Jeff Erbrecht <[email protected]> * time: add portable wrapper struct for tm This wrapper struct adds an explicit time zone offset field on platforms that do not include such a field within `struct tm`, such as on Windows. This gives us a place to store parsed time zone information so that we don't have to drop it. Signed-off-by: Jeff Erbrecht <[email protected]> * parser: use flb_tm wrapper struct This updates the parser APIs to use flb_tm.. Signed-off-by: Jeff Erbrecht <[email protected]> * strptime: use flb_tm instead of tm This changes the strptime APIs to use flb_tm. Any implementation conditional on FLB_HAVE_GMTOFF has been reverted since flb_tm now has a field to store the time zone offset on all platforms. Signed-off-by: Jeff Erbrecht <[email protected]> * parser: json: use flb_tm Signed-off-by: Jeff Erbrecht <[email protected]> * parser: regex: use flb_tm Signed-off-by: Jeff Erbrecht <[email protected]> * parser: logfmt: use flb_tm Signed-off-by: Jeff Erbrecht <[email protected]> * parser: ltsv: use flb_tm Signed-off-by: Jeff Erbrecht <[email protected]> * parser: remove spurious trailing space Signed-off-by: Jeff Erbrecht <[email protected]> * parser: fix test Signed-off-by: Jeff Erbrecht <[email protected]> Signed-off-by: Jeff Erbrecht <[email protected]>
- Loading branch information
1 parent
d3a0697
commit cae9a8f
Showing
10 changed files
with
170 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.