Takeo Kusama
06/26/2022, 10:01 AMprisma.some_table.create({ date_column: new Date(2021,9,1) })
may interpret 2021-08-31T150000.000Z as UTC to 2021-08-31T000000.000Z so, the result it saves 2021-08-31 as the date.
It is ideal if prisma orm accept date.toLocaleString() as date type record value, but it doesn’t. For codebase clean as possible, I don’t want to rely on add offset base solutions. Is there any idea?Takeo Kusama
06/26/2022, 6:06 PMFinally I decided to this data to int yyyymmdd value, since date type can't be representative of date without timezone because UTC 00:00:00 have diff 1 day and can't avoid without offset if I use minus offset time.
If we ready 1 db / 1 region int data is enough to query over month.