logoalt Hacker News

mulmenyesterday at 11:15 PM1 replyview on HN

> What format should you use? Human readable strings for longterm storage, because when things go wonky, it’s easier to debug.

You can just use a TIMESTAMP with no TZ data. It's functionally the same as using the string but simpler because you avoid all the string handling headaches and gain the benefit of avoiding to avoid double booking and date/time functions to answer questions like "how many appointments do I have in April?".


Replies

jagged-chiseltoday at 1:02 AM

I am willing to concede to “human readable” and dropping “string” iff queries on TIMESTAMP are producing a human readable string (I believe they are … I haven’t been in postgres in at least six weeks and details like that don’t make a lasting impression in muh brain)

show 1 reply