company July 21, 2008

Dates: Relative or Absolute?

Another item we’re looking at as we get closer to the Stack Overflow private beta is the issue of how to display dates on the questions and answers. We started by displaying the absolute dates as you’ll see them on Joel’s existing forum — although we do add the time as well: Monday, June 27,…
Avatar for Jeff Atwood
Co-Founder (Former)

Another item we’re looking at as we get closer to the Stack Overflow private beta is the issue of how to display dates on the questions and answers. We started by displaying the absolute dates as you’ll see them on Joel’s existing forum — although we do add the time as well:

Monday, June 27, 2005 at 6:35 pm

This works fine, assuming you’re in the same time zone as the server. (Actually, now that I think about it, maybe that’s why Joel opted to drop the time part; the odds of your time zone being in a completely different day from the server’s time zone is fairly slim.) Otherwise, you have to record the user’s time zone and translate all the server times to their local time.

We noticed that some sites, like getsatisfaction, opt to display all times in relative units. So the above would be rendered as:

Three years ago

Granted, it lacks precision, but did you really need to know the message was originally left on June 27th? And isn’t it simpler not to have to do the “how old is this” math in your head? The other big advantage is that relative times work for every timezone, so you don’t have to tell us your timezone in your user profile, and we don’t have to be scrupulously careful to convert every date we touch.

However, note that the precision of the date increases automatically as the messages get closer to “now”:

Three years ago
Two months ago
17 days ago
6 minutes ago

We’re leaning heavily towards displaying all question and answer times in relative units now. What are your thoughts?

Podcast logo The Stack Overflow Podcast is a weekly conversation about working in software development, learning to code, and the art and culture of computer programming.

Related

servers falling over like dominoes but getting an alert
code-for-a-living October 23, 2020

Failing over without falling over

You’ve gone through the motions and play-acted a disaster recovery scenario, but despite spending a lot on the production, it’s not real. What you have is a fairy tale: “Once upon a time, in theory, if everything works perfectly, we have a plan to survive the disasters we thought of in advance.” In practice, it’s more likely to be a nightmare.
newsletter January 1, 2021

The Overflow #54: Talking crypto

Welcome to ISSUE #54 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. While we are off for the holidays, we still have some sweet newsletter presents to give: your digital identity and you, dealing with sudden bursts of errors, and the secret origin…