www.delorie.com/archives/browse.cgi | search |
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=xqqd | |
1keB8LrCxLZnjDKO5WSMXY3/O+tDcprb4hhBqVvXzqkd+rtiyVwv1I4C+vYabZOc | |
cJ0S7oddUvRAlvKdJ+Br9qsEFr26ygoSUQOXbC+ezLTNEN0ixM49tjK7LsjbS8BV | |
iRDGtKSnEJGAzGI+XIMD/MbuzidpNppNVj+QkrQ= | |
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=RpbBoGYsKr | |
/Y5ZYI4tpHhZHJoi0=; b=I2TAGlCCZ6mSwm/t2W3fE1jbQXARpWda538NmcUhXm | |
k7kq0KjcFfsEOePp3fbknbHjXa7ukwR2wikOl0oqJh59jRdTmjdvY4jwDyqWie28 | |
j1L4KqQ1j6uooTJBvQ6JgTZ4jsu0LRwveZjQ7sEP+KvhraMhpeNTyBLGKSZhBvL0 | |
s= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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=-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 |
Subject: | Re: Different representations of time in ls -l and date(1) |
To: | cygwin AT cygwin DOT com |
References: | <A45B1767F1002449A37508C2CC6003D736A232 AT DEFTHW99EJ1MSX DOT ww902 DOT siemens DOT net> <860c2a0f5dd46780649de9a26ebc0464 AT mhoenicka DOT de> <dcd35b85-cfff-a821-a81c-b311db1bd242 AT farance DOT com> <60d27734-5ce7-6e25-e170-a0baa5442a69 AT redhat DOT com> |
From: | Eric Blake <eblake AT redhat DOT com> |
Openpgp: | url=http://people.redhat.com/eblake/eblake.gpg |
Message-ID: | <d8e13286-e58d-5eec-7080-40941603ddd3@redhat.com> |
Date: | Wed, 31 Aug 2016 09:45:58 -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: | <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> |
X-IsSubscribed: | yes |
--5AMtnB21xkSKxOpkliCpl89VuAGxCnNmO Content-Type: multipart/mixed; boundary="ECrN4cBcTWtL4irUDu9nMdQGRCDJ63PDh" From: Eric Blake <eblake AT redhat DOT com> To: cygwin AT cygwin DOT com Message-ID: <d8e13286-e58d-5eec-7080-40941603ddd3 AT redhat DOT com> Subject: Re: Different representations of time in ls -l and date(1) References: <A45B1767F1002449A37508C2CC6003D736A232 AT DEFTHW99EJ1MSX DOT ww902 DOT siemens DOT net> <860c2a0f5dd46780649de9a26ebc0464 AT mhoenicka DOT de> <dcd35b85-cfff-a821-a81c-b311db1bd242 AT farance DOT com> <60d27734-5ce7-6e25-e170-a0baa5442a69 AT redhat DOT com> In-Reply-To: <60d27734-5ce7-6e25-e170-a0baa5442a69 AT redhat DOT com> --ECrN4cBcTWtL4irUDu9nMdQGRCDJ63PDh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" -----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--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |