-
Notifications
You must be signed in to change notification settings - Fork 53
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
30 support asctime field for timestamp #139
30 support asctime field for timestamp #139
Conversation
json_handler_test.go
Outdated
@@ -153,3 +154,26 @@ func TestJSONHandler_UnmarshalJSON_ParsesCustomMultiNestedFields(t *testing.T) { | |||
t.Fatalf("not equal: expected %q, got %q", tm, h.Time) | |||
} | |||
} | |||
|
|||
func TestParseAsctimeFields_1(t *testing.T) { | |||
raw := []byte(`{"asctime": ["12-05-05 22:11:08,506248"]}`) |
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.
maybe pull these in a table-test?
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.
There's an issue with asctime
since it doesn't include timezone information. For now, my implementation assumes the parsed time is in UTC, this assumption may be incorrect depending on the user application's logging configuration.
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.
there's a config value for this on the config struct 🙂
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.
I see
No description provided.