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
Cannot set Timezone on connection using SYSTEM timezone #52
Comments
|
It seems to work if I use 'US/Pacific' instead of 'America/Los_Angeles' in the options.timezone |
|
I know this might sound stupid, but have you tried... yarn add https://github.com/MariaDB/mariadb-connector-nodejs.git |
|
Can you indicate sequelize and moment-timezone versions in package-lock.json ? |
|
Sorry for the delay. sequelize: 5.8.6 The sequelize constructor options for dialectOptions are |
|
Everything good? Close issue? |
|
ok, found the issue. Using timezone exactly corresponding to client current timezone might cause automatic retrieval of server timezone. |
|
Fix verified working for me. Thanks |
lib version v2.0.5
Maria v10.3.13
Connection via Sequelize v5
When I try to connect I am getting this error, I'm not sure why because my coworker has the same settings and it is working for him. Connecting through Sequelize v5.
The error points to this file:
/node_modules/mariadb/lib/connection.js:730:20where I see this query:SELECT @@system_time_zone stz, @@time_zone tzThe output of which reads:however the next part of the code does a lookup in moment which is expecting an IANA timezone string like 'America/Los_Angeles' but it is getting fed the argument 'PDT' so it returns null...
As seen in the moment docs here:
https://momentjs.com/timezone/docs/#/zone-object/abbr/
I've tried setting my timezone in mariadb to the IANA America/Los_Angeles but it says it's invalid...
How can I get this working?
The text was updated successfully, but these errors were encountered: