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

关于timestamp, time类型值读取出来, 会在字段值进行转换的时候发生改变 #929

Open
shubifeng opened this issue Mar 27, 2018 · 7 comments

Comments

@shubifeng
Copy link

shubifeng commented Mar 27, 2018

1.关于timestamp, time类型值读取出来, 会在字段值进行转换的时候发生改变.

个人认为不管出于什么目的 都应该从设计上保证 拿到的值 和 最终输出的值保证一致, 这样才是一个合理有效的数据连接器, 而不是数据发生意外转换.

@osheroff
Copy link
Collaborator

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.

@ericwush
Copy link
Contributor

It is Chinese. It was trying to address an issue that timestamp and time are converted to different values than the original ones. I'm not sure if it's related to other timestamp issues like #928 because no example was given.

@shubifeng can you please give an example?

@liulikun
Copy link
Contributor

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.

@saup007
Copy link

saup007 commented Apr 13, 2018

@shubifeng You can refer to #903, it will solve your problem.
哈哈。

@shubifeng
Copy link
Author

@ericwush

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.

@osheroff
Copy link
Collaborator

@shubifeng you should make sure that both your MySQL server and the host maxwell is running on are set to the same timezone.

@markusborg
Copy link

markusborg commented Jun 8, 2018

if MYSQL and MAXWELL are set to CST (Asia/Taipei), is there a way for Maxwell to generate events in UTC?

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

No branches or pull requests

6 participants