From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3068 invoked by alias); 31 Aug 2016 14:46:11 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 3045 invoked by uid 89); 31 Aug 2016 14:46:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:60d2773, H*MI:sk:60d2773, H*i:sk:60d2773 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Aug 2016 14:46:00 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B90043A39 for ; Wed, 31 Aug 2016 14:45:59 +0000 (UTC) Received: from [10.3.116.27] (ovpn-116-27.phx2.redhat.com [10.3.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7VEjw8Y004274 for ; Wed, 31 Aug 2016 10:45:58 -0400 Subject: Re: Different representations of time in ls -l and date(1) To: cygwin@cygwin.com References: <860c2a0f5dd46780649de9a26ebc0464@mhoenicka.de> <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: Date: Wed, 31 Aug 2016 15:23:00 -0000 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: <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5AMtnB21xkSKxOpkliCpl89VuAGxCnNmO" X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00635.txt.bz2 --5AMtnB21xkSKxOpkliCpl89VuAGxCnNmO Content-Type: multipart/mixed; boundary="ECrN4cBcTWtL4irUDu9nMdQGRCDJ63PDh" From: Eric Blake To: cygwin@cygwin.com Message-ID: Subject: Re: Different representations of time in ls -l and date(1) References: <860c2a0f5dd46780649de9a26ebc0464@mhoenicka.de> <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> In-Reply-To: <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> --ECrN4cBcTWtL4irUDu9nMdQGRCDJ63PDh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 983 On 08/31/2016 09:36 AM, Eric Blake wrote: > Not necessarily. ls hardcodes its default representation for files > younger than 6 months to: >=20 > "%b %e %H:%M" >=20 > while date hardcodes its default representation to: >=20 > nl_langinfo(_DATE_FMT) >=20 Except that I just tested, and nl_langinfo(_DATE_FMT) for both Cygwin and Linux is %a %b %e %H:%M:%S %Z %Y so something else weird is going on. Oh duh, it's locales! nl_langinfo() is locale-specific, and you are (probably) running in a default locale of en_US rather than the C locale. $ date Wed, Aug 31, 2016 9:39:55 AM $ LC_ALL=3DC Wed Aug 31 09:43:42 CDT 2016 So, the answer to your question is determined by what your locale thinks is the appropriate representation; and I have no control over whether Windows' locale defaults will match glibc's locale defaults for en_US or any other locale outside of C. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ECrN4cBcTWtL4irUDu9nMdQGRCDJ63PDh-- --5AMtnB21xkSKxOpkliCpl89VuAGxCnNmO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----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/ iQEcBAEBCAAGBQJXxu2mAAoJEKeha0olJ0NqRK8IAKNiWyX0zo1gVBuOfnbPXbls 9L9IlJFE7ApJW5tGaa8TwH42co2kVHHDPSPN9yHehkspeBLSmmhK1zAW6H7FTL0r BQBYjY8DI+LqNXRoGhBiGNSZK9sDvfZmAtCzP4YxKzJIHhAMyUx/FSmLNFDOqLlZ 43hgDT8YH+xKmCM7zFryLUQgLpJYnLu+TYrhsNlCY64sPvD3KhRVgjbdzCtXIsSE nyUlDrYEhsOkYlPk6fMlK/CtTOvZlRsn80n9SXTrzWfFK0r8NjB/0hOv8fJdZX9E KyiiqBt4iTDfhPwS09zP4KbkVJVSEdUrBH5BmCL616bVZcTDJ08shMT+X49s4xw= =R7zF -----END PGP SIGNATURE----- --5AMtnB21xkSKxOpkliCpl89VuAGxCnNmO--