question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cassandra: dbeaver displays the day prior for all date columns in results.

See original GitHub issue

Version 4.04. I query for the July 3 and Dbeaver displays July 2! This does not happen with native cqlsh or Toad.

`CREATE KEYSPACE test WITH replication = {‘class’: ‘SimpleStrategy’, ‘replication_factor’: ‘1’} AND durable_writes = true;;

CREATE TYPE test.udt_citystate ( city text, state text );

CREATE TABLE test.people ( Name text, date date, citystate FROZEN<udt_citystate>, PRIMARY KEY (Name, date));

insert into test.people (Name,date,citystate) values (‘FRED’,‘2017-07-03’,{city:‘Houston’,state:‘Texas’}); select * from test.people where name = ‘FRED’ and date = ‘2017-07-03’;`

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-ridercommented, Jun 30, 2018

This is MySQL-specific. In some cases recent MySQL driver (8.*) cant recognize server timezone properly and thus interprets timezones incorrectly. Workaround: set driver property “serverTimezone” in driver properties to a correct value. Valid timezone list: https://github.com/dbeaver/dbeaver/wiki/JDBC-Time-Zones

I think I’ll add timezone selector in the main MySQL connection properties page.

Another workaround is to downgrade MySQL driver to 5.x version (note: it is not fully compatible with MySQL 8.* servers).

0reactions
yanirmorcommented, Jul 5, 2018

Hi Serge, Thank you for the fast response and implementation in v5.1.2! Unfortunately the issue persists even after changing the serverTimezone to UTC (through either the “Driver properties” or the new “Server Time Zone:” feature)

If you have any other advice on how to solve this I would really appreciate it!

DB timezone: UTC MySQL version: 5.6.39-log Driver: mysql:mysql-connector-java:RELEASE [5.1.44]

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing Data Formats - DBeaver Documentation
The DBeaver formatting functions allow you to set up database locale and change ... Select Use native date/time format check-box and the data...
Read more >
How to change DBeaver timezone / How to ... - Stack Overflow
Just go to Settings -> Editors -> Data Formats and select 'Use native date/time format' checkbox. enter image description here. Share.
Read more >
Function extract() | date_part() returns double precision
The following table function attempts to extract, in turn, each of the fields with legal names (there are twenty-two in all) from values...
Read more >
Cassandra Functionality - DBeaver Forum • View topic
it shows column families for SYSTEM and OpsCenter keyspces. I am also unable to run any sql statements in the script window. ......
Read more >
DBeaver Reviews & Ratings 2022 - TrustRadius
DBeaver is used by me to work with SQL Server databases. Continue reading ... Results ordering by column; Data export with all applied...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found