8 ms·
Oh, I was going to mention that one. We're in October 2023. A video published in November 2021 should not say "1 year ago" but rather "Almost 2 years ago".
by bbx 3y ago
Oh, I was going to mention that one. We're in October 2023. A video published in November 2021 should not say "1 year ago" but rather "Almost 2 years ago".
- dmd 3y agoEven better would be for it to say "November 2021".
- typon 3y agoWhere's the fun in that? Let's design heuristics that work culturally in some parts of the world and be imprecise instead!
- Moru 3y agoWhat's wrong with 2021-11-21T15:10:35 ?
- dmd 3y agoYou mean 1637507435?
- pjscott 3y agoYes. As God intended when He created the heavens and the earth on January 1, 1970.
- deleted 3y ago[deleted]
- layer8 3y agoThe “T”, mostly.
- barbazoo 3y agoTime portion not being useful I'd say.
- irrational 3y agoI’d prefer it to use the month name. Then it doesn’t matter if you write it November 12 2012 2012 November 12 12 November 2012 2012 12 November Etc.
- Moru 3y agoIt matters a lot if you try to sort on that column
- hanniabu 3y agoWe're talking about how it's displayed on the frontend, not how it's stored on the backend
- Brian_K_White 3y agoOne persons front end is another persons back end.
- salawat 3y agoEspecially if you're a proctologist.
- NewJazz 3y agoWe use YYYY-MM-DD HH:mm:as on the frontend because it sorts lexicographically, which is useful for interactive tables.
- 3y ago
- _dain_ 3y agoThe T makes it hard to visually parse. Whenever I try to read a timestamp using the T I have to scan it very carefully to see the date-time boundary. It'sWasWifWweWusedWaW"W"WtoWdenoteWwordWboundaries. I beg you people, use a space: 2021-11-21 15:10:35 See how much easier that is?
- deleted 3y ago[deleted]
- MereInterest 3y agoI agree on the 'T' being harder to read, but dislike the use of a space as it makes it ill-suited for use in a filename, and would allow word-wrapping to occur between the two sections. I'd much rather they had used an underscore instead of a 'T'.
- explaininjs 3y agoDoes windows not allow spaces or something? Unix variants seem fine with it.
- Dalewyn 3y agoProgrammers hate dealing with whitespace in strings with a burning passion.
- cratermoon 3y agoWhich I've always considered a weird anachronism, because 'space' isn't represented any differently than any other character, U+0020, unless you really want to get into the variety of "whitespace" elements. Same with newlines. It's all bytes.
- bigDinosaur 3y agoBest to avoid spaces in file names even if the OS allows it (hell, you can put a new line in file names in Linux and I believe Mac OS but that's a terrible idea) because many programs will exhibit major error states if they end up processing these names due to assumptions about file names.
- coding123 3y agoI prefer stardate
- DonHopkins 3y agoI prefer parsecs since a long long time ago. But I don't mean to pick a Star Wars / Star Trek fight: I'm bistellar, I love both of them!
- deleted 3y ago[deleted]
- matja 3y agoIt's missing the timezone offset
- solardev 3y agoIt's missing the time zone offset /cry I had to fix so many of these in various databases and frontends, lol
- Moru 3y agoNot used for display purposes though :-)
- Karellen 3y agoWhy not just display it in the viewers' timezone?
- whirlwin 3y agoHow do you determine the viewer's timezone? A lot of apps try to find your timezone and it works fine until you travel abroad to a country with a different timezone.
- Karellen 3y agoIf your own user-agent or OS is working on the wrong timezone, that's your fault. A website/app shouldn't have to find your timezone. It should use whatever one you've set. If you've set your timezone to one you didn't want, I'm not sure what you'd expect other software is meant to do about that. Fix your config.
- cratermoon 3y agoMostly because the browser Javascript API for Date is kind of crap for dealing with timezone info. There are some efforts to standardize on a better API, but it's going to take time to migrate.
- solardev 3y agoHow do you know what time zone to convert it FROM? Unlike epoch time (Unix time in milliseconds or seconds), "2021-11-21T15:10:35" doesn't automatically mean UTC without a "Z" or "+0" at the end. Without the time offset, that timestamp could be in any of the world's timezones. There's no way to know what moment in time was actually stored/meant. Even if the user set it in one time zone, if we store it without a proper offset (and preferably a locale), we cannot properly account for the user traveling to another place, daylight savings time, government time adjustments, leap time, etc. These complexities compound off each other and make proper scheduling and debugging time issues really, REALLY hard later on. In the twenty years or so that I've been doing web dev, datetime is probably the single biggest gotcha I've seen developers (including myself) stumble into. Part of this is because the standard JS datetime handling is atrocious compared to any other language I've worked in. It doesn't really natively handle time zones well, and well carelessly cast them back and forth if you're not careful. Moment and Luxon can help with this, lighter libs like date-fns can too with the right extensions, but out of the box JS is going to fuck it up. I promise. Another choice is to just use milliseconds to store everything, and convert that to the user's timezone only at the time of display. Every timestamp is stored as an epoch, and every user has their time zone (not just offset, because of daylight savings) recorded with their profile. Doing those two simple things can avoid most of the landmines.
- HaZeust 3y agoISO 8601 is so annoying because timezone offsets are now no longer implied
- MereInterest 3y agoI thought ISO 8601 allowed both unqualified times (e.g. "2023-10-14T19:21:45"), which are assumed to be local times, and qualified times (e.g. "2023-10-14T19:21:45−01:00"). Which one is used is then a choice left up to an individual program.
- the42thdoctor 3y agoThere, even better: 21/11/2021
- Jenda_ 3y agoNo: 1) unfortunately ambiguous with also widely used MM/DD/YYYY, 2) cannot be naturally sorted, the order does not go from the most significant to the least significant, especially when appended with HH:MM:SS.
- Moru 3y agoSorry, can't sort it in a column. I'm totally uninterested in everything that ever happened the first of january. I want to see the mails from last night on top.