From owner-freebsd-questions@FreeBSD.ORG Mon May 30 02:48:29 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40DAA16A41C for ; Mon, 30 May 2005 02:48:29 +0000 (GMT) (envelope-from markzero@logik.ath.cx) Received: from addr9.addr.com (addr9.addr.com [209.249.147.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E57043D48 for ; Mon, 30 May 2005 02:48:29 +0000 (GMT) (envelope-from markzero@logik.ath.cx) Received: from logik.ath.cx (localhost [127.0.0.1]) by addr9.addr.com (8.12.11/8.12.8/Submit) with ESMTP id j4U2mEQS045345; Sun, 29 May 2005 19:48:15 -0700 (PDT) Received: by logik.ath.cx (Postfix, from userid 1001) id B7CBC611B; Mon, 30 May 2005 03:48:14 +0100 (BST) Date: Mon, 30 May 2005 03:48:14 +0100 From: markzero To: Dan Nelson Message-ID: <20050530024814.GA73611@logik.ath.cx> References: <20050530023552.GA63697@logik.ath.cx> <20050530024256.GA5689@dan.emsphone.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <20050530024256.GA5689@dan.emsphone.com> X-GPG-Key: http://darklogik.org/pub/pgp/pgp.txt X-Fingerprint: B776 43DC 8A5D EAF9 2126 9A67 A7DA 390F DEFF 9DD1 X-ADDRSpamFilter: Passed, probability (10%) X-ADDRSignature: 2D8B1C57 Cc: freebsd-questions@freebsd.org Subject: Re: epoch->calendar date(1) wizardry X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 02:48:29 -0000 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > How may one pretty print an epoch timestamp using date(1)? The date > > manual page gives me a headache. > >=20 > > Essentially, I have the timestamp in a file: > >=20 > > $ cat t > > 1117417465 > >=20 > > ..and I want to print it in a standard UK format, such as: > >=20 > > +%H:%M:%S %d/%m/%y >=20 > date -r $(cat t) +"%H:%M:%S %d/%m/%y" Oh my, it's really that simple? I think I must have tried just about everything ELSE as my twenty minutes of Failed conversion of ``1117417465'' using format ``%H:%M:%S %d/%m/%y'' date: illegal time format =2E..suggest. 02:44:25 30/05/05 Thank you! --=20 PGP: http://www.darklogik.org/pub/pgp/pgp.txt B776 43DC 8A5D EAF9 2126 9A67 A7DA 390F DEFF 9DD1 --azLHFNyN32YCQGCU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iQIVAwUBQpp+7afaOQ/e/53RAQpPBQ/7B98CorR/mjB66lFVKATNOhkpDK0WGM9R 7xu1F3/7FVogA12QGnH2pWwBGjMhDpCxc3qukxoSei40XtSQFatcCbU+Pce48xI1 KBk7QR+D1J/BVwi384tRCfHA4u57HnX8QBh6cEMlnHszF6A8m3GUVWOLoSxNjd13 WJqkEeZyD3kg9dLrm01LvwNvaBr01pyB88jU9qph5FWCLsM+hIAfl5Yzx1EVXpSJ X/oltK4neYSW9IQBw+qguxJHE1oDgRmuJCVI7nNney1fcNH0zgpJ0gcWJL1ARBaU DLZZ7/fURSbJZQe9eUxGHL55Docmm801n/mg2NrjPe+KWvXFw8DfR6BfNyOExWVI N5WJyyydYYUOsocIkg7VKMB7AZS0AlT3i9Flup0LHi75ti/X/w7Ml98lYg9DzXFp MqPVFuPbo95u7rhtlqLq0uwKKTkYRQfGsEpVSUhv5GY3r30wkDMQfFWS115eZcZD VjgAbG1k3/jsbDstS7z3ACiKckCfJqXQYFv4GO12ZJJzaUVh5N/ukt4TxY++lBBh Qh6Lg0ITSlxHH4u9Et+sX+XeaIE6LAUtbvYO0wIU/AgNpLJJHZQ+MfulMi/qHH3j ta5V4cDgR80PCo9m282DfaaVa+2+1ladPS4p75tKDnQc6yj867ayfgddj+fRCOoA sA1ANZm380M= =eR+N -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--