MariaDB dialect timezone warning
See original GitHub issueWhat 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:
- Created 4 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So the temp solution is to add the timezone to dialectOptions like this:
But maybe we can add to Sequelize fix of auto adding it to the dialect options
https://github.com/MariaDB/mariadb-connector-nodejs/issues/48