Skip to content

problem with dates + timezones #1117

Description

@mtselishchev

This issue arises in v.0.3.2

Suppose a Clickhouse server is located in UTC+0 timezone, while the client is on UTC-x timezone.
Then the following query

SELECT toDate('2022-10-27')

will return 2022-10-26 on the client side.

It seems that somewhere inside Java the date '2022-10-27' turns into '2022-10-27 00:00:00 UTC', which is the same as '2022-10-26 20:00:00 NY(UTC-4)', and the latter converts to '2022-10-26'.

Legacy version (v.0.2.6) works fine by the way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions