Hacker News new | ask | show | jobs
by lijok 953 days ago
Few things irk me as much as systems that show you "N hours/minutes/seconds ago" instead of the timestamp. GitHub for example, of all systems, should know better. Trying to write up a report of any sort and not having access to accurate timestamps is very annoying.
4 comments

I'm with you.

It's usually possible to hover the thing to have the actual timestamp show in a tooltip, but this is so clunky.

I haven’t checked github, but on gitlab this is a user preference setting that you can change. But I do wish that the full timestamps were the default.
Hover your mouse over those and you should get the absolute date. Some if not many are using time tags.
Amazing, how have I never seen this. Thank you !
I attempted to solve this recently with a browser extension at https://github.com/sharat87/inhuman-time

Previously discussed at https://news.ycombinator.com/item?id=33446662

Yep, my theory is that often that's done as a way to sidestep difficult issues around dealing with time zones. "2 hours ago" doesn't require you to think about whether your user is in the same time zone as your database.
You still have to calculate the distance between a date on the DB and a date on the client, the timezone difficult issues are not sidestepped at all
Your server and DB are both UTC. If not, that's something you just need to fix. The server can then calculate the difference trivially. Then you no longer need to do anything on the client. Eg, this is what Django's timesince or timeuntil filters do: https://docs.djangoproject.com/en/4.2/ref/templates/builtins...