From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 12:10:37 2011 Received: (at submit) by debbugs.gnu.org; 1 Dec 2011 17:10:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWA9c-0006ND-UN for submit@debbugs.gnu.org; Thu, 01 Dec 2011 12:10:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW8ej-0003oV-5B for submit@debbugs.gnu.org; Thu, 01 Dec 2011 10:34:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RW8eV-0000oK-Ir for submit@debbugs.gnu.org; Thu, 01 Dec 2011 10:34:27 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:39876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW8eV-0000oG-HL for submit@debbugs.gnu.org; Thu, 01 Dec 2011 10:34:23 -0500 Received: from eggs.gnu.org ([140.186.70.92]:59914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW8eP-0005zj-Ti for bug-coreutils@gnu.org; Thu, 01 Dec 2011 10:34:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RW8eK-0000mo-2o for bug-coreutils@gnu.org; Thu, 01 Dec 2011 10:34:17 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:44970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW8eJ-0000mh-P3 for bug-coreutils@gnu.org; Thu, 01 Dec 2011 10:34:12 -0500 Received: by bke17 with SMTP id 17so2951818bke.0 for ; Thu, 01 Dec 2011 07:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=u1ejJZmLIn2ofGqcyrx7UVhgpGIiwx04e7w9+SFlKLs=; b=H95sZ9jSBr1hhdhLdZ0fbnsC3TT/3pc0fNdxObidOx/TveQ55ciqYhlJWsAzfahloG nxWiWrI1DcEkIp66DOiHIx7oxuO0E/WC7nXq9RMk4w3XPCaEGNXZCPTQzL/cVa58b8Ca xbZ7RuPnRSiFYUrfxxCCmBbUwcIyjmxwf2ch4= Received: by 10.204.132.78 with SMTP id a14mr8146912bkt.15.1322753650951; Thu, 01 Dec 2011 07:34:10 -0800 (PST) Received: from [192.168.1.11] (nat4-240.ghnet.pl. [91.150.221.240]) by mx.google.com with ESMTPS id hw14sm12011351bkc.16.2011.12.01.07.34.10 (version=SSLv3 cipher=OTHER); Thu, 01 Dec 2011 07:34:10 -0800 (PST) Message-ID: <4ED79E71.10804@gmail.com> Date: Thu, 01 Dec 2011 16:34:09 +0100 From: Krzysztof Kowalski User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: Century bug in date utility? References: <4ED79D11.5080200@gmail.com> In-Reply-To: <4ED79D11.5080200@gmail.com> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 01 Dec 2011 12:10:35 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.6 (-----) Hello, We have 2011, HOWEVER: korn% date +%C 20 korn% date Thu Dec 1 16:26:30 CET 2011 apc% apc% date +%C 20 apc% apc% date Thu Dec 1 16:26:51 2011 And many other call returns that we live in 20 century :) For a test I changed system time to 1997 and date utility returned 20 century as well :) -- best regards -- Kowalski Krzysztof From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 12:35:48 2011 Received: (at control) by debbugs.gnu.org; 1 Dec 2011 17:35:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWAXz-000719-If for submit@debbugs.gnu.org; Thu, 01 Dec 2011 12:35:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWAXw-00070s-1k; Thu, 01 Dec 2011 12:35:45 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pB1HZXF2020876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Dec 2011 12:35:33 -0500 Received: from [10.3.113.136] (ovpn-113-136.phx2.redhat.com [10.3.113.136]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pB1HZWf6012288; Thu, 1 Dec 2011 12:35:32 -0500 Message-ID: <4ED7BAE3.9070305@redhat.com> Date: Thu, 01 Dec 2011 10:35:31 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Krzysztof Kowalski Subject: Re: bug#10182: Century bug in date utility? References: <4ED79D11.5080200@gmail.com> <4ED79E71.10804@gmail.com> In-Reply-To: <4ED79E71.10804@gmail.com> X-Enigmail-Version: 1.3.3 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig5E9C7EBC5DA0188AE309DA6F" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: control Cc: 10182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5E9C7EBC5DA0188AE309DA6F Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable tag 10182 notabug thanks On 12/01/2011 08:34 AM, Krzysztof Kowalski wrote: > Hello, >=20 > We have 2011, >=20 > HOWEVER: >=20 > korn% date +%C > 20 > korn% date > Thu Dec 1 16:26:30 CET 2011 Yep. And this behavior is mandated by POSIX for strftime(), so it is not a bug. http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html C Replaced by the year divided by 100 and truncated to an integer, as a decimal number. [ tm_year] That is, it is NOT the "century" in the vernacular (where years in the range [2001,2100] are collectively called the 21st century), but the first two digits of the year. The idea is that you combine %C%y to form = %Y. >=20 > For a test I changed system time to 1997 and date utility returned 20 > century as well :) No, %C in 1997 returned 19. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig5E9C7EBC5DA0188AE309DA6F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJO17rjAAoJEKeha0olJ0NqvlIH/0DMeYCHP1xyAwodfNNNaKSa Nj84ISrWxTUwSPPp9PP/cn8jezjfxMyVqTDnTQll6ZPSIZYnSVwGY4ypGpklKZ8O 9GrX4T84KztDdWF5k5KojeUDPHbQnopTFYFo5soS8TZSmWwcCcKr50S2bMlvskxU Nkp5x2dc19Zsc7mHwiTI4MYAtux1SoTW6IoIIhrJQpewFDnHXKih9asAa2gDiMVg 50t6XNqxyubWimHBAHQEb0GayBnezHtFeNulMNFDvMYuQdpxpKeCYgR8RDSpfY5y 4wObvAPUNMstdeeZaLSjJuqIWr+ME3Dc8KOx1FG70Vxre0XuWhT0DKucKw3pBq4= =otXF -----END PGP SIGNATURE----- --------------enig5E9C7EBC5DA0188AE309DA6F-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 13:46:08 2011 Received: (at 10182-done) by debbugs.gnu.org; 1 Dec 2011 18:46:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWBe4-0000zI-KA for submit@debbugs.gnu.org; Thu, 01 Dec 2011 13:46:08 -0500 Received: from mail-yw0-f44.google.com ([209.85.213.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWBe2-0000z9-8l for 10182-done@debbugs.gnu.org; Thu, 01 Dec 2011 13:46:07 -0500 Received: by ywm13 with SMTP id 13so2137852ywm.3 for <10182-done@debbugs.gnu.org>; Thu, 01 Dec 2011 10:45:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=TseLvGuxdO4nuwXRQA/WmJ3R+xHN3PcfXmh0fGmmdig=; b=AHDMj17lbHldOL+I4mhxBX8+xA68By1oomw87AV7J6wAvN7ZB2SHeUU7rF5rDQQ0zl EYeP+k04Bmck5WGDBQHzJ6DbMvOtJHBrTwOqRIQHV3dpD42b4dLaiyjGEO8SSMW6wg3p OYByV0xWEtWdR6j9lnBHdExBAnjy3RBe3h4Qw= Received: by 10.204.148.75 with SMTP id o11mr8855390bkv.95.1322765154782; Thu, 01 Dec 2011 10:45:54 -0800 (PST) Received: from [192.168.1.11] (nat4-240.ghnet.pl. [91.150.221.240]) by mx.google.com with ESMTPS id j9sm13198442bkd.2.2011.12.01.10.45.54 (version=SSLv3 cipher=OTHER); Thu, 01 Dec 2011 10:45:54 -0800 (PST) Message-ID: <4ED7CB5C.5070107@gmail.com> Date: Thu, 01 Dec 2011 19:45:48 +0100 From: Krzysztof Kowalski User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#10182: Century bug in date utility? References: <4ED79D11.5080200@gmail.com> <4ED79E71.10804@gmail.com> <4ED7BAE3.9070305@redhat.com> In-Reply-To: <4ED7BAE3.9070305@redhat.com> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 10182-done Cc: 10182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 W dniu 2011-12-01 18:35, Eric Blake pisze: > tag 10182 notabug > thanks > > On 12/01/2011 08:34 AM, Krzysztof Kowalski wrote: >> > > Yep. And this behavior is mandated by POSIX for strftime(), so it is > not a bug. > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html > > C > Replaced by the year divided by 100 and truncated to an integer, as > a decimal number. [ tm_year] > > That is, it is NOT the "century" in the vernacular (where years in the > range [2001,2100] are collectively called the 21st century), but the > first two digits of the year. The idea is that you combine %C%y to form %Y. > OK, thank you for answer, but it still isn't logical, century is century by common sense, if there's 21st century right now 21 should be returned. - -- best regards -- Kowalski Krzysztof -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJO18tcAAoJEF58oZESZVTjU7QIAJJGkrll7d9b+NT7AHTYms1V je2b5GzWD3DA+56QPqBLAOFv2XcnhcrxJIyAr117idsXrbRgxWFOiZTwniJYtjez Zkc8hWa2YKiljlSVut/XVG1jwEmDG3mYmmmxp6DfkPnF2/1ua3HMpiT9VvKg7Blp wNTrwdxBPapaFthSDPEKvuWFInx2ogmba17MNaW6zxXh+dWS0Sgh0Qz73ImnftiK PnSZeNsdiJszyx7etV9YdrsFB7zxpv9OduUArZ2y/XDWDjIBxbMM1hQTLH273Z6L PhNNMPPvTdFdTckWlO7fOdq5BD3CK4ISnWTiyImpooEt4A+rh0/YgR+o1v6dVWc= =qtC6 -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 13:53:27 2011 Received: (at 10182-done) by debbugs.gnu.org; 1 Dec 2011 18:53:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWBl9-00019n-Ac for submit@debbugs.gnu.org; Thu, 01 Dec 2011 13:53:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWBl5-00019e-JW for 10182-done@debbugs.gnu.org; Thu, 01 Dec 2011 13:53:25 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pB1IrChw013872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Dec 2011 13:53:12 -0500 Received: from [10.3.113.136] (ovpn-113-136.phx2.redhat.com [10.3.113.136]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pB1IrBcZ022916; Thu, 1 Dec 2011 13:53:12 -0500 Message-ID: <4ED7CD17.5010500@redhat.com> Date: Thu, 01 Dec 2011 11:53:11 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Krzysztof Kowalski Subject: Re: bug#10182: Century bug in date utility? References: <4ED79D11.5080200@gmail.com> <4ED79E71.10804@gmail.com> <4ED7BAE3.9070305@redhat.com> <4ED7CB5C.5070107@gmail.com> In-Reply-To: <4ED7CB5C.5070107@gmail.com> X-Enigmail-Version: 1.3.3 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig34FE9E3959B014D8BCE82676" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 10182-done Cc: 10182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig34FE9E3959B014D8BCE82676 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable On 12/01/2011 11:45 AM, Krzysztof Kowalski wrote: >=20 > OK, thank you for answer, but it still isn't logical, What's not logical, that %C follows POSIX? > century is century by common sense, > if there's 21st century right now 21 should be returned. Maybe the confusion is coming from the fact that 'date --help' mentions the word "century" as a mnemonic for %C, even though the POSIX wording for %C specifically avoids "century" because %C is _not_ a century in the vernacular usage. Would a patch to the 'date --help' wording alleviate your concerns? If so, could you propose better wording for what 'date --help' should say for %C that is still concise and accurate, but does not mention a misleading mnemonic? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig34FE9E3959B014D8BCE82676 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJO180XAAoJEKeha0olJ0NqEjgH+waBN19n9NAPLAJnJ6hYRcQQ 3YTRAVS+2XrvvOQNbTO040PJPE64Srt4Vp2uHpdXxBJ5EqBRxRF7zo+NUey7W1eO Jfwev4voqTpxmucduuU6MYwfxU5D/vFKkSUc0dEPB/5XtRHnVrG7yq3Q7XU6msN1 8ZcdufSZ+akwlXqHSo5J02LnRsI9IZSP04KWKWhShqWUMKMsEIHbBrZN70TYhNjq zLBtaDnzgg8e51dFCCgj6b2Vqr8My9JHE9XjXB/hOPv2BVDPbzpASnhsO/sU6MAW PBcv3tpLzKUYh1UWTbg8JJYGJF1L0GtqdYmSS682vDRXbQ2B6NiRUfLpYtNpwWk= =uW41 -----END PGP SIGNATURE----- --------------enig34FE9E3959B014D8BCE82676-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 13:54:53 2011 Received: (at 10182-done) by debbugs.gnu.org; 1 Dec 2011 18:54:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWBmX-0001Bl-JH for submit@debbugs.gnu.org; Thu, 01 Dec 2011 13:54:53 -0500 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWBmV-0001Be-D1 for 10182-done@debbugs.gnu.org; Thu, 01 Dec 2011 13:54:51 -0500 Received: by faap14 with SMTP id p14so1652005faa.3 for <10182-done@debbugs.gnu.org>; Thu, 01 Dec 2011 10:54:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=Xs3LbZZPnHTLjT18qqucoWfSIAzxVvMp4I7VVI0u2xo=; b=beEQm3XPbNb6n+PzegeIE25e5Mm8wg2vHvINjxzGOgvCJfVPxjAXB2+9JpBN9yjEBr 6C8KaV8lOKwC3VpkI8ieX7RHOh+4wgc+kwqRYgSaCJzGz4iCRHahmAk4KheGBRLRH9wM XLwKF6oWE2nNAYozce3fG/VGZxRnq0Wag8+RA= Received: by 10.204.34.148 with SMTP id l20mr8534539bkd.55.1322765680059; Thu, 01 Dec 2011 10:54:40 -0800 (PST) Received: from [192.168.1.11] (nat4-240.ghnet.pl. [91.150.221.240]) by mx.google.com with ESMTPS id cc2sm13211807bkb.8.2011.12.01.10.54.39 (version=SSLv3 cipher=OTHER); Thu, 01 Dec 2011 10:54:39 -0800 (PST) Message-ID: <4ED7CD69.9090803@gmail.com> Date: Thu, 01 Dec 2011 19:54:33 +0100 From: Krzysztof Kowalski User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#10182: Century bug in date utility? References: <4ED79D11.5080200@gmail.com> <4ED79E71.10804@gmail.com> <4ED7BAE3.9070305@redhat.com> <4ED7CB5C.5070107@gmail.com> <4ED7CD17.5010500@redhat.com> In-Reply-To: <4ED7CD17.5010500@redhat.com> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 10182-done Cc: 10182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.2 (--) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 W dniu 2011-12-01 19:53, Eric Blake pisze: > On 12/01/2011 11:45 AM, Krzysztof Kowalski wrote: >> >> OK, thank you for answer, but it still isn't logical, > > What's not logical, that %C follows POSIX? > >> century is century by common sense, >> if there's 21st century right now 21 should be returned. > > Maybe the confusion is coming from the fact that 'date --help' mentions > the word "century" as a mnemonic for %C, even though the POSIX wording > for %C specifically avoids "century" because %C is _not_ a century in > the vernacular usage. Would a patch to the 'date --help' wording > alleviate your concerns? If so, could you propose better wording for > what 'date --help' should say for %C that is still concise and accurate, > but does not mention a misleading mnemonic? > That would make sense ;), I can patch it. - -- best regards -- Kowalski Krzysztof -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJO181pAAoJEF58oZESZVTjAh8H/2pyl29u/5vAX7Vzez4Bx7+Z ivHE3zKZN4SHq9ZL2uyZ84HnqnMVJ1EhIS3XQOsQgQqnUriibphgIOvjAWZ1EdnP hTZ92eqn7XsYhU0O/78doZ3a3Zq/lpR9EMdneqxFFIdbn419UEDu/NXyV2nYx08Y QcAMaSytBKunItTTPhkveesg8veserIyxfUQ26dJwMLLVv0b6QDCqEOOsspBktkZ Z5zeHc6IzO7y2lg07CaUhBmdg+gG43dt1lmYH6eJ4cjv/vhQv+IOJzOwJCjvEJ0l ysZcNkQDgM217GECliYYZl8rf4I14Y8O0tWKyZo8p4N39zoQOg+KlsyohM8+AB8= =1iJp -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 16:42:56 2011 Received: (at 10182) by debbugs.gnu.org; 1 Dec 2011 21:42:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWEP9-00058i-AY for submit@debbugs.gnu.org; Thu, 01 Dec 2011 16:42:56 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWEP5-00058W-DQ for 10182@debbugs.gnu.org; Thu, 01 Dec 2011 16:42:52 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id A0CAF211D2; Thu, 1 Dec 2011 14:42:34 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 60E7D2DCD7; Thu, 1 Dec 2011 14:42:34 -0700 (MST) Date: Thu, 1 Dec 2011 14:42:34 -0700 From: Bob Proulx To: Krzysztof Kowalski Subject: Re: bug#10182: Century bug in date utility? Message-ID: <20111201214234.GA1694@hysteria.proulx.com> References: <4ED79D11.5080200@gmail.com> <4ED79E71.10804@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ED79E71.10804@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 10182 Cc: 10182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Krzysztof Kowalski wrote: > For a test I changed system time to 1997 and date utility returned 20 > century as well :) Of course you know you don't need to change the system time to test this. You can do it easily with date. $ date -d '1997-01-01 12:00 UTC' +%C 19 Bob From unknown Sun Jun 22 04:29:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 30 Dec 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator