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.

MariaDB dialect timezone warning

See original GitHub issue

What are you doing?

Using a very basic usage of Sequelize with MariaDB dialect, specifying the timezone.

Sequelize Config:

...
  dialect: 'mariadb',
  timezone: 'America/Los_Angeles',
...

Or

...
  dialect: 'mariadb',
  timezone: 'Etc/GMT+7',
...

What do you expect to happen?

Sequelize should not turn timezone into -07:00 (node_modules/sequelize/lib/dialects/mariadb/connection-manager.js:59), it should turn it into Etc/GMT+7 as MariaDB dialect expect.

What is actually happening?

Sequelize is turning my conf to -07:00.

node_modules/mariadb/lib/config/connection-options.js:113
warning: please use IANA standard timezone format ('Etc/GMT+7')

Environment

Dialect:

  • mariadb

“mariadb”: “^2.0.4”, Database version: 10.3.9-MariaDB-1:10.3.9+maria~bionic Sequelize version: sequelize@5.8.5 Node Version: v8.15.0 OS: macOS Mojave 10.14.4

Tested with the latest release:

  • No
  • Yes, specify that version: 5.8.5

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
idangozlancommented, May 10, 2019

So the temp solution is to add the timezone to dialectOptions like this:

...
  dialect: 'mariadb',
  dialectOptions: {
    timezone: 'Etc/GMT+7',
  },
...

But maybe we can add to Sequelize fix of auto adding it to the dialect options

Read more comments on GitHub >

github_iconTop Results From Across the Web

Time Zones - MariaDB Knowledge Base
MariaDB keeps track of several time zone settings. Setting the Time Zone. The time_zone system variable is the primary way to set the...
Read more >
Local time zone for MariaDB DB instances - 亚马逊云科技
By default, the time zone for a MariaDB DB instance is Universal Time Coordinated (UTC). You can set the time zone for your...
Read more >
Local time zone for MariaDB DB instances
By default, the time zone for a MariaDB DB instance is Universal Time Coordinated (UTC). You can set the time zone for your...
Read more >
5.1.15 MySQL Server Time Zone Support
If your system has its own zoneinfo database (the set of files describing time zones), use the mysql_tzinfo_to_sql program to load the time...
Read more >
MariaDBDialect (Hibernate JavaDocs) - Red Hat on GitHub
public class MariaDBDialect extends MySQLDialect. A SQL dialect for MariaDB ... Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect.
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