Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sheept
· 4mo ago · 0 comments
Why not store them as integers? Representing dates is a UI responsibility
Comments
[–]
nullisland00
4mo ago
Forcing all dates to be cast to a single time zone (UTC) complicates workflows when you’re on the other side of the globe. Many DBs have added a timestamp offset type for this to keep the data in the offset it occurred in.
[–]
panzi
4mo ago
I also want to be able to debug the database in an SQL console with nice looking date-times.
[–]
thaumasiotes
4mo ago
You can already do that:
https://sqlite.org/lang_datefunc.html
[–]
masfuerte
4mo ago
Just to state the obvious, you can create a view which uses these functions to make your integer date/times readable, and then debugging is easy.