-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
--use_client_time_zone does not affect all date-related functionality #699
Comments
Yes, this is a bug/limitation of how timezones currently work. The problem is that the client cannot set the server-side session timezone. All it can change is the timezone of client-side operations (that is, parsing and formatting). Here is a good mental model to help you avoid such surprises:
So in your case toDate() value is calculated by the server using the server timezone and sent to the client. The value is then formatted by the client (and Date values are formatted without regard for timezone). |
You always could specify time zone explicitly, for example:
|
Please add jdbc connection property, because this problem provokes writing guly code... |
jdbc has these properties |
After starting the client with said flag = 1 I got the following:
┌─toDateTime(1492124400)─┐
│ 2017-04-13 23:00:00 │
└────────────────────────┘
┌─toDate(1492124400)─┐
│ 2017-04-14 │
└────────────────────┘
This behavior seems rather unpredictable, is this to be expected or is this a bug ?
The text was updated successfully, but these errors were encountered: