TypeORM and PostgreSQL - How to return time in Create/UpdateDateColumn exactly as saved in DB?

Viewed 9

When I create, save or update an object, which has in its model the

    @CreateDateColumn()
    created_at?: Date;

    @UpdateDateColumn()
    updated_at?: Date;

And if I simply want to return the result, let's say, of a .findOneBy({id}) query, my API gives me a different Date value in those related fields in place of what is actually saved in the DB. See the screenshot for details. (I feel there is a timezone issue somewhere).

enter image description here

How can I return exactly the Date that is coming from the database?

0 Answers
Related