Subject: Re: Problem with date command
To: Mark E. Perkins <perkinsm@bway.net>
From: Stefan Schumacher <stefan@net-tex.de>
List: netbsd-help
Date: 12/12/2004 19:50:35
--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Also sprach Mark E. Perkins (perkinsm@bway.net)
> On 12/12/04 12:20, ipt@scraemon.org wrote:
> >The date command isn't giving output consistent with its man page. This
> >command, 'date +%c/%m/%d', should display=20
> >
> > 2004/12/12
> >
> >instead it displays
> >
> > Sun Dec 12 11:57:24 2004/12/12
> >
> >This used to display correctly in versions past, although I don't
> >remember which versions exactly. I'm running 2.0 right now.
>=20
> I can't comment on 2.0 behavior, since I don't have it running anywhere=
=20
> just yet. But I tried this on 1.5.something and 1.6.2 and get the same=20
> result that you did. I can get the result you *want* with 'date +%Y/%m/%d=
'=20
> on both of those systems. My reading of the man page for strftime(3)=20
> suggests that all is as it should be.
Right, it shows the same dateformat, since STRFTIME(3) reads:
%c is replaced by the locale's appropriate date and time
representation.
=09
Use +y/+Y instead
--=20
PostgreSQL at 21. Chaos Communication Congress
https://21c3.ccc.de/wiki/index.php/PostgreSQL
--OXfL5xGRrasGEqWY
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iD8DBQFBvKELEfTEHrP7rjMRAj2IAJoDSqj9EqGmavjUVXrL0QlBP4KyxgCgkLxW
BmIGSGIWrqg0BOBAKAlfyL0=
=ZtYP
-----END PGP SIGNATURE-----
--OXfL5xGRrasGEqWY--