Replies: 3 comments 2 replies
-
I am not sure why is the original issue converted to discussion. |
Beta Was this translation helpful? Give feedback.
-
There is definitely some very strange issue here. If |
Beta Was this translation helpful? Give feedback.
-
I will have a closer look at the repro, it looks a bit weird, but those issues are often about the environment and not the code itself. Overall, the most sane approach is to enforce UTC everywhere.
All the timezone options are there only for the column types that don't hold the TZ - it's never about the timezone-aware types. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Mikro ORM applies negative timezone offset when reading the Postgres timestamp (without tz) values which creates invalid date objects.
If option
forceUtcTimezone
is set totrue
, the conversion is not applied, but since PG column is timestamp (without tz), this should work correctly withoutforceUtcTimezone
applied.I am in GMT+2 TZ and the below test was ran at "2024-05-22T14:50:28.488" local time. The test output is:
Reproduction
What driver are you using?
@mikro-orm/postgresql
MikroORM version
6.2.5
Node.js version
18.17.1
Operating system
MacOS 14.0
Validations
Beta Was this translation helpful? Give feedback.
All reactions