-
Notifications
You must be signed in to change notification settings - Fork 1.7k
strptime: Support some of abbriviated timezone strings for GNU extensions #10379
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
Merged
Conversation
This file contains hidden or 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
fc67af9
to
3eb1fb8
Compare
3eb1fb8
to
e6a6197
Compare
e6a6197
to
0e49083
Compare
Signed-off-by: Hiroshi Hatake <[email protected]>
0e49083
to
bc05073
Compare
Signed-off-by: Hiroshi Hatake <[email protected]>
Signed-off-by: Hiroshi Hatake <[email protected]>
Signed-off-by: Hiroshi Hatake <[email protected]>
db99b87
to
ba1eab3
Compare
Signed-off-by: Hiroshi Hatake <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I implemented a capability to process TimeZone strings.
Plus,
FLB_HAVE_ZONE
is currently nothing effective. This is a vestigial macro that was used or copied from the original BSD's strptime.c code.Instead, we're able to use a detector which tries to compile the tm_zone member existence in
struct tm
to enable the conditional macro for tm_zone.Also, I added basic scenarios to run assertions for time zone strings and other functionalities on flb_strptime.
The corresponding issue is: #10331
This is because internally, we use
flb_strptime
as a time format parser on flb_parser.c.So, this change is effective for fluent-bit's parser.
The current supported time zone labels of 3-4 letter abbreviated strings:
Supported Timezone Abbreviations
UTC/GMT and Zulu
GMT
UTC
Z
UT
North American Timezones
EST
EDT
CST
CDT
MST
MDT
PST
PDT
AKST
AKDT
HST
HADT
AST
ADT
NST
NDT
European Timezones
WET
WEST
CET
CEST
EET
EEST
MSK
South American Timezones
ART
BRT
BRST
CLT
CLST
Australasian / Oceanian Timezones
AEST
AEDT
ACST
ACDT
AWST
NZST
NZDT
Asian Timezones
JST
KST
SGT
IST
GST
ICT
WIB
WITA
WIT
MYT
BDT
NPT
African Timezones
WAT
CAT
EAT
SAST
Military Timezones
These are single-letter UTC offset designators. 'J' (Juliett) represents local time and is not included. 'Z' (Zulu) is UTC and listed above.
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
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
fluent/fluent-bit-docs#1687
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.