Effect CommunityEC
Effect Community2mo ago
1 reply
luecu.

SqlClient Fails to Handle Ancient Dates from PostgreSQL

SqlClient with really old date (year 0023) does not work.

I have a PostgreSQL Database with a really old date stores in one row 0023-12-10 00:00:00.000.

When selecting this row with SqlClient it returns a Invalid Date

const result = yield* sql`SELECT * FROM table WHERE "id" = '123'`;
console.log(result); // x.date = Invalid Date 


Postgres handles old dates correctly so I think the problem is in the SqlClient.
Was this page helpful?