Live data from Hacker News

Use Timestamps

jankremer.eu

141–150 of 163 posts

Re: Use Timestamps

#141

Earlier quoted context omitted.

Space colonization is going to be a pain. We've just managed to get sensible datetime APIs with instants and zoned timestamps, but they only work when time is the same everywhere. As soon as relativity comes into play we'll have to come up with a different approach.

Nothing in the solar system has a relative speed different enough to earth to make common timestamps different - the difference is well below leap second impacts. As for simultaneity we already have to deal with that at the millisecond level. An event logged at 16:00:01.000 as far as LA is concerned maybe logged at 16:00:01.080 in London, or maybe at 16:00:00.920

I mean the clocks on different planets do tick at slightly rates. It's somewhere on the order of milliseconds per year, except for really large planets, but it does add up

Re: Use Timestamps

#142
Also, use correct lang attribute value for text, otherwise your website is being offered to be translated into English.

Re: Use Timestamps

#143

Earlier quoted context omitted.

Relativity is the least of your concerns when different planets have different length "hours"

All planets (in the same plane of relativity) agree on the length of a second. The length of a day varies - both on earth and on mars, and is meaningless for people in orbit, but a second is a second.

I think you forgot about general relativity there. Even just for satellites the length of a second is measurably different.

Re: Use Timestamps

#144
post #91

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.

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

Re: Use Timestamps

#145
post #70
post #65

Earlier quoted context omitted.

It shows "2023-11-15" below the title for me.

That wouldn't be considered a timestamp in my book. For starters, it doesn't have time information, only date information. Quickly asking ChatGPT it gives this answer: In computing, timestamps are commonly expressed in formats like "YYYY-MM-DD HH:mm:ss" (year-month-day hour:minute:second). When pressed about this particular time detail, ChatGPT elaborates: While "YYYY-MM-DD" is a common date format, it's not complete…

the post contains not one but two timestamps;

  
  

Re: Use Timestamps

#146
post #145
post #70

Earlier quoted context omitted.

That wouldn't be considered a timestamp in my book. For starters, it doesn't have time information, only date information. Quickly asking ChatGPT it gives this answer: In computing, timestamps are commonly expressed in formats like "YYYY-MM-DD HH:mm:ss" (year-month-day hour:minute:second). When pressed about this particular time detail, ChatGPT elaborates: While "YYYY-MM-DD" is a common date format, it's not complete…

the post contains not one but two timestamps;

Not visible enough according to the author:

> Also, don't make me look for the date. Put the date as obvious as possible, preferably at the beginning of the post.

Re: Use Timestamps

#147

Earlier quoted context omitted.

All planets (in the same plane of relativity) agree on the length of a second. The length of a day varies - both on earth and on mars, and is meaningless for people in orbit, but a second is a second.

I think you forgot about general relativity there. Even just for satellites the length of a second is measurably different.

Right, the passage of time is affected by how deep in a gravity well you are (i.e. how much acceleration you are experiencing). Time passes faster for satellites than for ground stations.

Re: Use Timestamps

#148

Earlier quoted context omitted.

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...

Re: Use Timestamps

#149

Earlier quoted context omitted.

Addendum: don’t rely on your git/wiki/document-system for tracking the timestamp. “This was accurate on $DATE” has a very different meaning than “this document was last edited on $DATE”. It might be 2 years out of date but someone fixed a typo last week. Just put a sentence/textbox somewhere with the date. If someone does a proper update, they will proudly edit that sentence too.

French government websites do this for help articles, they have a "last edited" and a "last verified" date on each article

Love it!

Re: Use Timestamps

#150

> was reading Julia Evans post about nothing [my emphasis] Off-topic, but is this a typo of "Nix" or a passive-aggressive jab at Julia for blogging about the tedium of actually getting anything to actual work in modern development?

It's gone now – Probably either accidental translation from German or intentional word joke ("nothing" in German and Dutch is pronounced similar to "nix");
Post reply on HN