From owner-freebsd-current@FreeBSD.ORG Wed Jan 5 18:20:47 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD42106564A for ; Wed, 5 Jan 2011 18:20:47 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id D46BB8FC0C for ; Wed, 5 Jan 2011 18:20:46 +0000 (UTC) Received: from park.js.berklix.net (p5B22F147.dip.t-dialin.net [91.34.241.71]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p05I0PUq010608; Wed, 5 Jan 2011 18:00:31 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id p05I0LM9030575; Wed, 5 Jan 2011 19:00:21 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id p05I0V7k002583; Wed, 5 Jan 2011 19:00:36 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201101051800.p05I0V7k002583@fire.js.berklix.net> To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Wed, 05 Jan 2011 14:21:55 +0100." <20110105132155.GO23329@acme.spoerlein.net> Date: Wed, 05 Jan 2011 19:00:31 +0100 Sender: jhs@berklix.com Cc: current@freebsd.org Subject: Re: RFC regarding usage of ISO 8601 throughout the tree X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 18:20:47 -0000 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.