X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=MgOf WWcwaKmUZAhOEfi3//rMY5dShCmNMClt4dlEJvNS4lHSeRs6TxsfDPefzlWw+WWn oeDmVRrqrHbX5azOCQjcHBhkXKTYw0FlmTcEk/Y3XAiNhtqJs4YbQwkgNHZ+MmNs 46Sy5wBjA0c54cDvOAQHRcciqtTBKyt9HfJU/zk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=NiSh97RURT 8+ug1HxqBysShUmTY=; b=MHwUD9ijSL9N7qE7CDEXyHyiVM0tbA7IINxRHH1UoQ QUD/l7kNyxJmorYEPFkfrdYyXaQmFpXu1Y5YuTfbW4Q2fep8b1DdTJITIf21S6zi hNh5JZrWX0wV07Xd9ywGUfvezxgLo8/wAkwwvX/KKoEYlVhJwc6ZvoBfBHm4BSD7 I= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=younger, H*i:sk:dcd35b8, H*f:sk:dcd35b8, H*MI:sk:dcd35b8 X-HELO: mx1.redhat.com Subject: Re: Different representations of time in ls -l and date(1) To: cygwin AT cygwin DOT com References: <860c2a0f5dd46780649de9a26ebc0464 AT mhoenicka DOT de> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> Date: Wed, 31 Aug 2016 09:36:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX" X-IsSubscribed: yes --Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX Content-Type: multipart/mixed; boundary="9GColCfXgMp5pUQLjhBPcb1rS2Eucxmgj" From: Eric Blake To: cygwin AT cygwin DOT com Message-ID: <60d27734-5ce7-6e25-e170-a0baa5442a69 AT redhat DOT com> Subject: Re: Different representations of time in ls -l and date(1) References: <860c2a0f5dd46780649de9a26ebc0464 AT mhoenicka DOT de> In-Reply-To: --9GColCfXgMp5pUQLjhBPcb1rS2Eucxmgj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/31/2016 08:04 AM, Frank Farance wrote: > On 2016-08-31 08:09, Markus Hoenicka wrote: >> At 2016-08-31 13:41, Schwarz, Konrad was heard to say: >>> Sorry for the previous incomplete mail. >>> >>> So my problem is that date(1) outputs AM/PM style dates, whereas ls -l >>> uses 24 hour times. >>> >>> $ ls -l rtos_benchmark.lst >>> -rwxr-xr-x+ 1 mchn1350 Domain Users 263 Aug 31 13:14 rtos_benchmark.lst* >>> $ date >>> Wed, Aug 31, 2016 1:39:35 PM >>> $ echo $LC_TIME >>> >>> $ echo $LANG >>> en_US.UTF-8 >>> >>> Shouldn't they be using the same format? Not necessarily. ls hardcodes its default representation for files younger than 6 months to: "%b %e %H:%M" while date hardcodes its default representation to: nl_langinfo(_DATE_FMT) >=20 > Furthermore, I'd say that the default output of "date" should look like > the Linux one, which is the way it has looked on UNIX for about 40 years: >=20 > Linux: Wed Aug 31 08:56:10 EDT 2016 > Cygwin: Wed, Aug 31, 2016 08:54:49 >=20 > In other words, on Cygwin: get rid of the commas, put back the timezone. Sounds like the bug is in cygwin1.dll's nl_langinfo() function for returning a date format with spurious commas. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9GColCfXgMp5pUQLjhBPcb1rS2Eucxmgj-- --Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXxuuCAAoJEKeha0olJ0NqvNsH/RnsGcvM6OdYNLcB2jN10DbZ 20Vj604C7UDI13AcVGaiFmgfj8Ke8cfaNjE4E0QGZIK4NyJidp6pP2SCERQTvzsC NXjdRyj3OJcihKjJGSz4GmVXLnql9i2r9m0XZrbam2CxO+pznDt9aq84o2c5H0/A DMtGygYc4Y529rNyTUXYWedwKGaOACFjtMG75aoqgMXtMhqj+AEfB65WeBGq3s9J ecswHImQ+4NEpYCP5E1bOUinF3OIC1ySiV+6IWBcjbW9G/SQ8XyIU8klDL63izwX AbjVkwE12Qz65HS+Z68H5NCAh/nBwKBEgQM0xpPCZT3fGLZEf8V8f2fTBpTQflM= =1/sK -----END PGP SIGNATURE----- --Nj5xaLHEbhKbL8lSqdCWpH8Fbhc9RIXiX--