Open bohumilmilacek opened 1 month ago
drizzle-orm
0.33.0
drizzle-kit
0.24.2
My timezone is Europe/Prague, I set it in both the database and in the drizzle connection however those hours differ, drizzle retrieves the dates and sets them + 2 hours
const connection = mysql.createPool({ uri, timezone: 'Europe/Prague', });
db: container_name: my_db image: mysql:latest restart: unless-stopped environment: MYSQL_DATABASE: my_db MYSQL_ROOT_PASSWORD: xxxxx TZ: Europe/Prague ports: - "9106:3306" volumes: - ....
Example of dates retrieved from db:
STORED IN DB: '10/4/2024, 8:08:56 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 6:11:12 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 5:54:18 PM'
DRIZZLE STATES: '10/4/2024, 10:08:56 PM', '10/5/2024, 3:00:00 AM', '10/4/2024, 8:11:12 PM', '10/5/2024, 3:00:00 AM', '10/4/2024, 7:54:18 PM'
Please help me with this issue. Is drizzle converting the dates not using the timezone or is it using some time format which messes it up?
Expected behaviours is for the drizzle to retrieve same dates as are in the database.
DRIZZLE STATES: '10/4/2024, 8:08:56 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 6:11:12 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 5:54:18 PM'
The same problem!
The result of my query using the framework is:
The result of my query using mysql2 is:
mysql2
What version of
drizzle-orm
are you using?0.33.0
What version of
drizzle-kit
are you using?0.24.2
Describe the Bug
My timezone is Europe/Prague, I set it in both the database and in the drizzle connection however those hours differ, drizzle retrieves the dates and sets them + 2 hours
Example of dates retrieved from db:
STORED IN DB: '10/4/2024, 8:08:56 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 6:11:12 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 5:54:18 PM'
DRIZZLE STATES: '10/4/2024, 10:08:56 PM', '10/5/2024, 3:00:00 AM', '10/4/2024, 8:11:12 PM', '10/5/2024, 3:00:00 AM', '10/4/2024, 7:54:18 PM'
Please help me with this issue. Is drizzle converting the dates not using the timezone or is it using some time format which messes it up?
Expected behavior
Expected behaviours is for the drizzle to retrieve same dates as are in the database.
STORED IN DB: '10/4/2024, 8:08:56 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 6:11:12 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 5:54:18 PM'
DRIZZLE STATES: '10/4/2024, 8:08:56 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 6:11:12 PM', '10/5/2024, 1:00:00 AM', '10/4/2024, 5:54:18 PM'
Environment & setup