Skip to content

Make test 01852_cast_operator independent of timezone - #27037

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix-test-01852
Jul 31, 2021
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix-test-01852

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jul 31, 2021
@alexey-milovidov alexey-milovidov self-assigned this Jul 31, 2021
@alexey-milovidov
alexey-milovidov merged commit 8c9c4ef into master Jul 31, 2021
@alexey-milovidov
alexey-milovidov deleted the fix-test-01852 branch July 31, 2021 20:20
SELECT CAST(\'2010-10-10\', \'Date\') AS c
2010-10-10 00:00:00
SELECT CAST(\'2010-10-10\', \'DateTime\') AS c
SELECT CAST(\'2010-10-10\', \'DateTime(\\\'UTC\\\')\') AS c

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You fixed only a test, but probably we should fix CAST itself? We need to return a beginning of a Date when converting from date to datetime?

@alexey-milovidov

Copy link
Copy Markdown
Member Author

@qoega Yes, we already do.
But in some timezones, the DST conversion happens at midnight, thus 00:00:00 civil time did not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants