Comment

Comment by gjvc

We have a very similar problem. We keep timestamps in numeric form as "epoch nanos" (nanoseconds from 1970-01-01 00:00) We are using PostgreSQL as the database, and I would very much like to use the native type (TIMESTAMP) [1], but PostgreSQL only keeps TIMESTAMP columns to microseconds, not nanoseconds. :-(

Using the native DBMS types allows use of native DBMS time and interval functionality, unless you like doing it yourself.

See also [2]

[1] https://www.postgresql.org/docs/9.6/static/datatype-datetime...

[2] http://stackoverflow.com/questions/409286/should-i-use-field...

parent gjvc 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton