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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Gvd5jfUJzxLE7CMHGkD6gyt/xbaodX1mx5E4AE4TqXvSPdDUKIK2T DdUuZpREwCRXCud+e0OndJcBgeorUOdJ//YDCMBIMKWKizkOx/6pidwWseLZpQ3A 7EZGgSxW2erulD6azywxHBweBtLbIeZFPNkZP3iqBCmLJS2GM4QwUs= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=uuWCvJsmmSK2rdvnwl3fNKBoxXo=; b=e5zjh+HC0TIunDjNwVkRGR32O2pT l7J0cQr4VysFqUJPeLMIV3GQ5jD+DgbYXRA26GHqfXu1RsD0bZcNkERYoj+QvT+V AAIX8OBlYM3BJuflSaQiw/EE9I95Y+0wl6iE05otF9IAzI+lDTDXedICK7By6gyI 0nZD8FxZFTxiy/U= 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=-101.6 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1643, expectation X-HELO: drew.franken.de Date: Wed, 31 Aug 2016 16:48:09 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Different representations of time in ls -l and date(1) Message-ID: <20160831144809.GB22389@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <860c2a0f5dd46780649de9a26ebc0464 AT mhoenicka DOT de> <60d27734-5ce7-6e25-e170-a0baa5442a69 AT redhat DOT com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: <60d27734-5ce7-6e25-e170-a0baa5442a69@redhat.com> User-Agent: Mutt/1.6.2 (2016-07-01) --yNb1oOkm5a9FJOVX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 31 09:36, Eric Blake wrote: > 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.l= st* > >>> $ 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? >=20 > 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 > >=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 year= s: > >=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. >=20 > Sounds like the bug is in cygwin1.dll's nl_langinfo() function for > returning a date format with spurious commas. Windows LOCALE_SLONGDATE contains these commas in the en-US locale. Outside of the "C"/"POSIX" locale the expectation of identical date/time strings on different platforms is not feasible. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --yNb1oOkm5a9FJOVX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXxu4pAAoJEPU2Bp2uRE+gWaMQAKV6eLk3vTDakgIAHmzUuZGe lDQ8onD3S7R7TG5sUwqCiM/C/pNwal5DbK6f2W40IkSYD0ppYQ6srsA74kw3xvgO UAZX4+iYrOwUf3ff/Bn3mvK/7I9vUf+a6Begn7n+1f2TbIOo2YYG/lnmjvfJ6xo3 FGHIrKMce5jfG7kjNwZ5ocRnJDcjGO7UGGSgRnKkx0j8rgzdDdWxxRRqW08jWjrn 1nbaQ/Sb1PyBVXdap6nfn5m/k1vaWVx+Vhw3BRtV6KrqMKIIKrz+i+yBXUJGqv+E ySxqmG9QUO08UvZnFtXcDXcY/2WyLMRvJE63VLKbWX7gue8ElcnNDdKyjcML1tu7 Nulcvsu5cqEXzNadCiolY8+XqiZqr1EAesF3Y88DYsDcmDgvyEgE78QWEOvXjKzc mxi3YfO5xa8Frms8lQR28JSL1PPmsPlXWLgjBg7fyimgibjiuSiHYAO15jOxN/1y bbLl0X1JhpPJ1Rcnp6zk93yoH2rTz9HLtlHefkL2AoVTszje0vbnNqQfnlmmYu4J Tq9w0guzBOf97AMK1bgLtMz+BQh94XBx+49GabY0NzXc7hxfBoBCCvACP+Ri+Usr QJ45cCmJ7LQeRh4SwZD+3WXkEXO1SqCxpURa8ZG47lkROW1ItaPaE0iY7/EXMS7q xYsmPXAsRPlgJBZvko/j =hsU8 -----END PGP SIGNATURE----- --yNb1oOkm5a9FJOVX--