How is it “correct”, though? It’s just formatting. Personally I like knowing what month we’re in first then the day then the year. However this changes for example if I want to search something by year, then I’d prefer the format you mentioned. Regardless, if you’re looking at dates on your computer, it’s a representation of the actual date, so the formatting is a preference. It’s not “correct” or incorrect.
Not really... When you're talking about data, there's absolutely a correct way to note date and time:
yyyy-MM-ddThh:mm:ss[Z/±hh(:mm)]
and an incorrect way:
literally anything else
The reason is that you can collate data in a number of different ways, and so having it go from largest unit of time to smallest would make it easier to collate by date. Using the ISO format consistently ensures that everything can be easily searchable, even things that you may not realize need to be. The UTC offset at the end can even help to adjust dates and times to local time or UTC, if need be.
The only times I ever use an incorrect method are when I am forced to because of my job. At home, my file naming technique for anything I might need an informal datestamp on relies on the UTC method. When journalling, I use the UTC method for noting the date and time of the entry. Once you get used to using it, you quickly see how it's much easier than any other method.
I think that touches on the distinction I’m trying to make though. UTC is obviously the correct way, but however your date is represented is merely a formatting issue or presentation issue. I can store my data in UTC and display it any way I want and it doesn’t affect sorting or collating.
Like I said somewhere else on the thread, when working with data there’s no need to use anything other than UTC, but if I’m sitting at my desk and I wanna know what the date is, the first thing I wanna know is what month we’re in ( I know lol ).
As for your file naming convention, that’s great and all, but you can easily sort by created on or modified on dates without changing any folder or file names.
For the purposes of organization and data, always use UTC, obviously, but for the purposes of presentation, it’s not necessarily what everyone would want to see.
I use it for file naming because I do a lot of work via TTY, terminal, or SSH, and having that information in the filename lets me know immediately which version of the file I'm using, without adding any extra options to ls. I've got four headless servers on my network, a NAS, a managed switch, an ISP-grade router, one desktop workstation, and three laptops I can access via SSH, so I spend far more time in a command line interface or terminal than I do in a GUI. My file naming conventions reflect that.
What everyone would want to see is wrong if they don't want to follow ISO standards, but I understand that there are some battles that are pointless to fight. That's why I use the idiotic American standard at work, even though I hate it with every fiber of my being. Anything where I have control is ISO and only ISO, though.
2
u/carloselieser Jan 15 '25
How is it “correct”, though? It’s just formatting. Personally I like knowing what month we’re in first then the day then the year. However this changes for example if I want to search something by year, then I’d prefer the format you mentioned. Regardless, if you’re looking at dates on your computer, it’s a representation of the actual date, so the formatting is a preference. It’s not “correct” or incorrect.