12 points

Issue: there are 27 different ways of writing a date.

Engineers: We most make a common standard that is unambiguous, easy to understand and can replace all of these.

Issue: there are 28 different ways of writing a date.

Joke aside, I really think the iso standard for dates is the superior one!

permalink
report
reply
13 points

2013-02-27 = 1984

permalink
report
reply
20 points

2013-02-27 is a weird way of writing 1361923200

permalink
report
reply
9 points

I agree with the ISO approach, but unfortunately without mainstream adoption in a majority of countries it’s just another standard.

permalink
report
reply
30 points

The sane way of dealing with it is to use UTC everywhere internally and push local time and local formatting up to the user facing bits. And if you move time around as a string (e.g. JSON) then use ISO 8601 since most languages have time / cron APIs that can process it. Often doesn’t happen that way though…

permalink
report
reply
1 point

The BEST way is to use the number of seconds after the J2000 epoch (The Gregorian date January 1, 2000, at 12:00 Terrestrial Time)

permalink
report
parent
reply
1 point

ISO 8601 goes from 1582 (Julian calendar adoption) but can go even further with agreement about intention and goes down beyond the millisecond. Not sure why I want an integer from the year 2000 which only represents seconds.

permalink
report
parent
reply
7 points

Generally yes, that’s the way to do it, but there are plenty of times where you need to recreate the time zone something was created for, which means additionally storing the time zone information.

permalink
report
parent
reply
4 points

Definitely. If your servers aren’t using UTC, then when you’re trying to sync data between different timezones, you’re making it harder for yourself.

permalink
report
parent
reply
3 points

This is what I try to do in the few apps I’ve written that had to deal with dates and times

permalink
report
parent
reply
1 point
*
Deleted by creator
permalink
report
parent
reply
1 point

The clue was in “user facing bits”. UTC represents time as an absolute. If you want to show local time, or deal with daylight savings you run UTC through a function on its way to the user.

permalink
report
parent
reply
10 points

I think you skipped part of the sentence.

permalink
report
parent
reply

Comic Strips

!comicstrips@lemmy.world

Create post

Comic Strips is a community for those who love comic stories.

The rules are simple:

  • The post can be a single image, an image gallery, or a link to a specific comic hosted on another site (the author’s website, for instance).
  • The comic must be a complete story.
  • If it is an external link, it must be to a specific story, not to the root of the site.
  • You may post comics from others or your own.
  • If you are posting a comic of your own, a maximum of one per week is allowed (I know, your comics are great, but this rule helps avoid spam).
  • The comic can be in any language, but if it’s not in English, OP must include an English translation in the post’s ‘body’ field (note: you don’t need to select a specific language when posting a comic).
  • Politeness.
  • Adult content is not allowed. This community aims to be fun for people of all ages.

Web of links

Community stats

  • 11K

    Monthly active users

  • 3.8K

    Posts

  • 54K

    Comments

Community moderators