Jaymal
DTDrizzle Team
•Created by Jaymal on 4/4/2024 in #help
Timestamp formatted differently if fetched as relation rather than directly
Hi team,
I'm using
"drizzle-orm": "^0.30.7"
with a PostgreSQL DB and postgres-js etc.
I'm seeing a little issue that I can't get to the bottom of, whereby timestamps are being formatted differently on retrieval from the DB, depending on whether the entity is being queried directly, or whether it is included via a relation on another entity when that is queried.
Querying directly, the timestamps are in a readable but non-ISO format:
As a relation, the same timestamps are in the desired ISO format:
The schema for these two timestamp fields looks like this
Ideally everything would be returned in the ISO format, so that we can handle these consistently when displaying in the rest of our application.
Any ideas if I'm missing something?
Thank you!19 replies