3 ms·
I loath the T and Z characters, so respectively I use a single dash (Between the date and time) and no Z; for time I often leave in the colons (:). Example: 20
by mjevans 6y ago
I loath the T and Z characters, so respectively I use a single dash (Between the date and time) and no Z; for time I often leave in the colons (:).
Example: 20210226-00:01:25 this presents the data in a format I can easily visually parse and also easily search for useful things in log files with.
When parsing such a date I tend to throw out all of the characters, but the 'Zulu' or timezone at the end probably should be parsed in anything that isn't a trivial internal use.
- eurasiantiger 6y agoIn other words, you are not using a standard format.
- mjevans 6y agoI think of it as a modified form of the standard format, where the standard format doesn't fulfill the needs of my use case.
- bhaak 6y agoI find it impressing that you can easily parse 20210226-00:01:25. The time is of course no problem but even with "20210226" standalone, I stumble and misread 10 and 22 before noticing that this doesn't parse. If there are more zeros and more 1's or 2's, it gets even worse. I hate it that the migrations in Rails are numbers only. "db/migrate/20210218125920_add_new_column.rb" is simply not human parseable.
- apricot 6y agoWhen I visited China, I saw 11-digit phone numbers commonly written without any punctuation or spaces: like 12020569031. I guess you can get used to it.