-
Notifications
You must be signed in to change notification settings - Fork 1k
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
关于timestamp, time类型值读取出来, 会在字段值进行转换的时候发生改变 #929
Comments
If you leave comments in english you're much more like to get a response. I think there's a couple of folks here who speak whatever the hell language this is but I'm not sure how active they are. |
It is Chinese. It was trying to address an issue that @shubifeng can you please give an example? |
Maxwell doesn't change the values for those columns. MySQL uses UTC time zone for internal storage for time related column types, that's what we get from MySQL binlog replication, so all the values output by Maxwell are UTC based. |
@shubifeng You can refer to #903, it will solve your problem. |
MySQL SQL: insert into timezonetest(date_c,datetime_c,timestamp_c) values('2018-02-25','2018-02-25','2018-02-25 10:00:00'); Maxwell : {"database":"test","table":"timezonetest","type":"insert","ts":1519457490,"xid":34205,"commit":true,"data":{"id":3,"date_c":"2018-02-25","datetime_c":"2018-02-25 00:00:00","timestamp_c":"2018-02-25 02:00:00"}} The timestamp_c minus 8 hours, is also wrong. |
@shubifeng you should make sure that both your MySQL server and the host maxwell is running on are set to the same timezone. |
if MYSQL and MAXWELL are set to CST (Asia/Taipei), is there a way for Maxwell to generate events in UTC? |
1.关于timestamp, time类型值读取出来, 会在字段值进行转换的时候发生改变.
个人认为不管出于什么目的 都应该从设计上保证 拿到的值 和 最终输出的值保证一致, 这样才是一个合理有效的数据连接器, 而不是数据发生意外转换.
The text was updated successfully, but these errors were encountered: