Skip to content

[Bug] time_zone not work for function from_unixtime #15284

@yangzhg

Description

@yangzhg

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master

What's Wrong?

time_zone not work for function from_unixtime

What You Expected?

time_zone is work for from_unixtime

How to Reproduce?

set enable_fold_constant_by_be=true;
set time_zone="+00:00";
MySQL [(none)]> select from_unixtime(1553152255);
+---------------------------+
| from_unixtime(1553152255) |
+---------------------------+
| 2019-03-21 15:10:55       |
+---------------------------+
1 row in set (0.009 sec)

it should be

MySQL [(none)]> select from_unixtime(1553152255);
+---------------------------+
| from_unixtime(1553152255) |
+---------------------------+
| 2019-03-21 07:10:55       |
+---------------------------+
1 row in set (0.009 sec)

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions