Ulrich =?utf-8?B?U3DDtnJsZWlu?= wrote: > !ACHTUNG BIKESHED ALERT! > > Hello, > > With the recent changes to the committer graphs, I again was reminded > how much I hate the YYYY/MM/DD format (I can't help it ...). Given that I guess & hope you mean you like linear decreasing order but dislike '/' as a delimeter & want to swap from '/' to '-' as in ISO ? > this almost looks like ISO 8601, but is an unreadable variant of it, I > would like to aggressively change this throughout the tree. > > I'd like to start with minor stuff like share/misc/*.dot. Then probably > src/UPDATING, and ports/UPDATING after I've identified the consumers of > these docs. Do you mean you would like to swap eg src/UPDATING 20100720 to eg 2010-07-20 ? That would be more readable. > The ultimate goal would be to change syslog's timestamp and ps(1) > output, but that goal is far off ... I've long had a mental note to get round to fixing isnd which emits: "05.01.2011 13:15:06" To "2011-01-05 13:15:06" However reading that URL, I see isdnd should have eg: 2011-01-05T13:15:06 2011-01-05T13:15:06+01:00 2011-01-05T12:15:06Z But that 'T' is hard to see, so either space it (allowed by ISO) 2011-01-05 13:15:06 2011-01-05 13:15:06+01:00 2011-01-05 12:15:06Z or lower case the 't' (if ISO allows ?) 2011-01-05t13:15:06 2011-01-05t13:15:06+01:00 2011-01-05t12:15:06Z > http://en.wikipedia.org/wiki/ISO_8601 > > Uli Week numbers in ISO standard can (& should IMO) be ignored: Not much use for week numbers in FreeBSD, Dates when source code is released, & /var/logs get stamped etc, best without week numbers, just simplistic linearly progressive continuously decremental digit format (ie Year Month Day Hour Minute Second Week numbers not used much, eg I'm British, lived in Germany 25 years. First I ever saw of week numbers was in Germany, never saw them in Britain. /usr/src/bin/date/ Although default output of date eg Wed Jan 5 17:41:06 CET 2011 is both non linear, & also non conformant in timezone (CET should be +01:00) it would open a can of worms to change default output, [unless it hangs on an env var.] ... [at least yet] ... too many shells use it (in user's own code, not just in /usr/src & /usr/ports). I don't see anything in `man date` to internaly emit timezone per ISO, this works: echo "`date -u +%Y-%m-%dt%H:%M:%S`Z" echo "`date -u +%Y-%m-%dt%H:%M:%S`+00:00" echo "`date -v-1H +%Y-%m-%dt%H:%M:%S`Z" # (as my TZ is -01:00) but as that wouldnt do if nested inside more quotes from other shells, we could add to date.c to emit an explicit timezone, 2 flags to add, I suggest: - '-U' to force '-u' & also swap output of eg "CET 2011" to "2011Z" or "2011+00:00" ( '-U' is not yet used ). - Some flag to specify a numeric string eg [+-][0-5][0-9]:[0-5][0-9] (... maybe tie that in with man environ TZ tzset ? ) Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text; Not quoted-printable, or HTML or base 64. Avoid top posting, it cripples itemised cumulative responses.Received on Wed Jan 05 2011 - 17:20:47 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:10 UTC