You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's super annoying that Postgres stores high-precision timestamps, while JS can't even read them and ends up truncating the timestamp when it enters JS land, causing weird bugs later on when it comes to filtering & sorting.
Additionally, it doesn't appear that the latest version of Knex (2.2.0) allows projects using it to configure the default precision for timestamp/datetime fields. If this were possible, then we could just configure all new tables to use a lower precision value for all timestamp/datetime fields by default, without devs having to remember to set the correct precision.
So the request is - Please add a way to configure the default timestamp/datetime precision level.
The text was updated successfully, but these errors were encountered:
If it's unlikely for this to be addressed any time soon, I'm open to doing a PR for this, as long as I get some pointers about how this should be structured (just so I don't have to re-do it)
Until that gets approved, for the unfortunate souls that find their way here wondering why their pagination is failing, try using date_trunc('milliseconds', field).
Feature discussion / request
It's super annoying that Postgres stores high-precision timestamps, while JS can't even read them and ends up truncating the timestamp when it enters JS land, causing weird bugs later on when it comes to filtering & sorting.
Additionally, it doesn't appear that the latest version of Knex (2.2.0) allows projects using it to configure the default precision for timestamp/datetime fields. If this were possible, then we could just configure all new tables to use a lower precision value for all timestamp/datetime fields by default, without devs having to remember to set the correct precision.
So the request is - Please add a way to configure the default timestamp/datetime precision level.
The text was updated successfully, but these errors were encountered: