Replies: 1 comment
-
Hi Ryan. Yeah, that can definitely be argued. The same also goes for timestamp because js has less precision than PostgreSQL, but the idea here was to cover the most common usage, and as you write, users can either add a type override, or cast to I do think it would be worth adding more information about this behaviour in the docs perhaps? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Someone might argue that dates should not be represented by the JS "Date" object because JS "Date"s include time.
An associated gotcha is when taking a row received from postgresjs and then re-serializing that (JSON.stringify) to send to a client in a different timezone. The date may be off by 1 in that case.
There are a few ways of managing that gotcha but I think you could argue the safest way to do it without much fuss is just handling postgres dates as strings.
Beta Was this translation helpful? Give feedback.
All reactions