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

result of unix_timestamp() is not consistent with MySQL #7932

Closed
zz-jason opened this issue Oct 17, 2018 · 0 comments · Fixed by #7933
Closed

result of unix_timestamp() is not consistent with MySQL #7932

zz-jason opened this issue Oct 17, 2018 · 0 comments · Fixed by #7933
Labels
component/expression help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@zz-jason
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

In TiDB:

TiDB(localhost:4000) > select unix_timestamp('2018-01-01 18');
+---------------------------------+
| unix_timestamp('2018-01-01 18') |
+---------------------------------+
|                               0 |
+---------------------------------+
1 row in set (0.01 sec)

2. What did you expect to see?

In MySQL:

MySQL(localhost:3306) > select unix_timestamp('2018-01-01 18');
+---------------------------------+
| unix_timestamp('2018-01-01 18') |
+---------------------------------+
|                      1514800800 |
+---------------------------------+
1 row in set (0.00 sec)

3. What did you see instead?

as section 1 describled

4. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

TiDB(localhost:4000) > select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v2.1.0-rc.3-56-ge544882d0
Git Commit Hash: e544882d0b8c4cf4ec1b93722837d2821950bb9a
Git Branch: master
UTC Build Time: 2018-10-17 09:48:11
GoVersion: go version go1.11 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
1 row in set (0.01 sec)
@zz-jason zz-jason added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. component/expression labels Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant