Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 10
    to add to your argument, how many of them are formatted that way because of user settings on the computer you ran the scrip on? Commented Sep 27, 2018 at 11:05
  • The first one is not really "bash", it is the date program (and it outputs Do 27. Sep 22:27:09 CEST 2018 here.) Commented Sep 27, 2018 at 20:27
  • @PaŭloEbermann You are right, I hope it is better now. As I said many of these formats are localized so the actual format you see will depend on your localization options. Commented Sep 27, 2018 at 20:42
  • 4
    While the point of this Answer is true for end-user-oriented apps, not so for data exchange between systems, data serialization, message/data protocols, logging, tracing, debuggers, and so on. The ISO 8601 standard is rapidly becoming the norm for such uses aimed at system admins and programmers. Ditto for international or locale-agnostic scenarios. Commented Sep 27, 2018 at 22:01
  • 1
    This is a greatly under-appreciated answer, if only because it shows that many programs and libraries handling date output will do the wrong thing by default. I can excuse the UNIX program "date" incorrectly assuming that its common use case is to display dates in the supposedly more human readable (it's not, even when setup correctly) local format. But for the internals of programming languages this makes no sense whatsoever. Commented Oct 3, 2018 at 8:27