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

build: Use flb_strptime() by default #2433

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

fujimotos
Copy link
Member

Lionel Cons reports that Fluent Bit sometimes adds odd "drift"
to timestamps e.g. parsing "10000" with "%s" results in 13600.0
rather than 10000.0.

This occurs because "%s" is parsed differently depending on the
implementation of strptime(). Some use localtime() internally,
and others use gmtime(). This causes the parsed result to vary
by the amount of each system's time offset.

This patch attempts to fix that issue by defaulting to our own
version of strptime(), and hence makes the behaviour much more
consistent across platforms.

Signed-off-by: Fujimoto Seiji fujimoto@ceptord.net

@edsiper
Copy link
Member

edsiper commented Aug 7, 2020

thanks @fujimotos , few mins ago I did other similar adjustments. Can you adjust this PR and remove that option from the CMake file (actually is not longer needed)?

Lionel Cons reports that Fluent Bit sometimes adds odd "drift"
to timestamps e.g. parsing "10000" with "%s" results in 13600.0
rather than 10000.0.

This occurs because "%s" is parsed differently depending on the
implementation of strptime(). Some use localtime() internally,
and others use gmtime(). This causes the parsed result to vary
by the amount of each system's time offset.

For this reason, we started to always use our own implementation
of strptime(3). Remove the build option as being deprecated.

Signed-off-by: Fujimoto Seiji <fujimoto@ceptord.net>
@fujimotos
Copy link
Member Author

fujimotos commented Aug 7, 2020

@edsiper I have updated this PR. Now the build option
FLB_SYSTEM_STRPTIME is removed from the source tree.

(This option was being essentially effectless since f142d93)

@edsiper edsiper merged commit a8f9e4a into fluent:master Aug 7, 2020
@edsiper
Copy link
Member

edsiper commented Aug 7, 2020

thanks!

@fujimotos fujimotos deleted the sf/use-flb-strptime branch August 12, 2020 09:49
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

Successfully merging this pull request may close these issues.

2 participants