Closed yanghoxom closed 2 weeks ago
my solution is set database timezone to utc ref: https://discord.com/channels/1043890932593987624/1084576896039260202/threads/1270642238661197824
should be fixed by upgrading to drizzle-orm@0.36.0
and drizzle-kit@0.27.0
What version of
drizzle-orm
are you using?0.31.2
What version of
drizzle-kit
are you using?0.22.8
Describe the Bug
When I
createdAt will return the correct time but wrong format my local time is:
2024-08-04 09:42:20.000
data in the studio:2024-08-04T02:42:20.000Z
data that I get in backend:2024-08-04T09:42:20.000Z
data that I get in MySQL:2024-08-04 09:42:20
my schema
as i understand, mysql is displaying data according to system timezone studio/backend misunderstands timezone or does not have timezone config which makes it "think" data is utc and display data in utc format
update If I set env is TZ=UTC studio will show:
2024-08-04T09:42:20.000Z
backend still show:2024-08-04T09:42:20.000Z
-> still wrongExpected behavior
orm should show get data with the correct format/time
Environment & setup
No response