You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MySQL "date" handling does not correctly translate in and out from the mysql2 driver. This can cause dates to be a day off between input and output from the database. The "datetime" MySQL data type had been fixed earlier by the PR 1082, the PR associated with this bug does the same for the MySQL "Date" type.
Running the tests while having the ava test runner in timezone "America/Los_Angeles" will cause the test 'insert + select all possible dates' to fail. When the date inserted is new Date('2022-11-11') then when the column is selected out the date can be a day off. i.e. new Date('2022-11-10')
"test:tz": "TZ='America/Los_Angeles' ava tests/mysql.test.ts --timeout=60s --serial --match='*possible dates' --match='*timezone'",
Expected behavior
A date inserted into a MySQL date column will be the same day as when retrieved via select.
Environment & setup
MySQL
The text was updated successfully, but these errors were encountered:
What version of
drizzle-orm
are you using?0.28.6
What version of
drizzle-kit
are you using?0.19.13
Describe the Bug
The MySQL "date" handling does not correctly translate in and out from the mysql2 driver. This can cause dates to be a day off between input and output from the database. The "datetime" MySQL data type had been fixed earlier by the PR 1082, the PR associated with this bug does the same for the MySQL "Date" type.
Running the tests while having the ava test runner in timezone "America/Los_Angeles" will cause the test 'insert + select all possible dates' to fail. When the date inserted is new Date('2022-11-11') then when the column is selected out the date can be a day off. i.e. new Date('2022-11-10')
"test:tz": "TZ='America/Los_Angeles' ava tests/mysql.test.ts --timeout=60s --serial --match='*possible dates' --match='*timezone'",
Expected behavior
A date inserted into a MySQL date column will be the same day as when retrieved via select.
Environment & setup
MySQL
The text was updated successfully, but these errors were encountered: