-
Notifications
You must be signed in to change notification settings - Fork 800
support TYPE_DATETIME to es date (RFC3339 UTC) #143
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
Conversation
river/sync.go
Outdated
case schema.TYPE_DATETIME: | ||
switch v := value.(type) { | ||
case string: | ||
vt, _ := time.Parse("2006-01-02 15:04:05", string(v)) |
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.
seem you can use mysql.TimeFormat directly.
river/sync.go
Outdated
switch v := value.(type) { | ||
case string: | ||
vt, _ := time.Parse("2006-01-02 15:04:05", string(v)) | ||
timezone := time.Now().Local().Format("-0700") |
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.
why -0700 here?
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.
Fixed. Thanks :-)
hi @henter Can you add a test for this PR? |
@siddontang test updated, not sure if bugs or errors, thanks. |
elastic/client.go
Outdated
return nil, errors.Trace(err) | ||
} | ||
|
||
var m map[string]map[string]map[string]map[string]map[string]interface{} |
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.
horrible type here, seem it is better to define a structure here.
@siddontang mapping struct updated. thanks. |
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.
LGTM
No description provided.