Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2005 11:46:22 +0100
From:      markzero <mark@darklogik.org>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: epoch->calendar date(1) wizardry
Message-ID:  <20050530104622.GA59664@logik.ath.cx>
In-Reply-To: <20050530103237.GA42500@orion.daedalusnetworks.priv>
References:  <20050530023552.GA63697@logik.ath.cx> <20050530103237.GA42500@orion.daedalusnetworks.priv>

next in thread | previous in thread | raw e-mail | index | archive | help

--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, May 30, 2005 at 01:32:37PM +0300, Giorgos Keramidas wrote:
> On 2005-05-30 03:35, markzero <mark@darklogik.org> wrote:
> > Hello,
> > How may one pretty print an epoch timestamp using date(1)? The date
> > manual page gives me a headache.
> >
> > Essentially, I have the timestamp in a file:
> >
> > $ cat t
> > 1117417465
>=20
> 	$ date -j -f '%s' 1117417465 '+%Y/%m/%d %T %z'
> 	2005/05/30 04:44:25 +0300
>=20
> The -j and -f options, when combined together, can help you convert
> practically any format that strptime(3) can read and parse to any time
> strftime(3) can print.

Sounds good.

I think the main problem was the fact that I had everything upside
down and back to front.

Cheers!
Mark

--=20
pgp: http://www.darklogik.org/pub/pgp/pgp.txt
B776 43DC 8A5D EAF9 2126 9A67 A7DA 390F DEFF 9dD1

--XsQoSWH+UP9D9v3l
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iQIVAwUBQpru/afaOQ/e/53RAQpWLhAAlSPNScY2HO0ioC+oia7WUFb6KXAiiA9Q
UkNiXpHGsugXXZvH9IDUwVeOhSBkoAboLfquUBvcMEgr9nPfRhMKzc960OwU4Kpb
6spf4m6gLaPCFUe4DbFCK6nkpCPehklpPted3k6EQ87ZlRXlVeC9F6RBuwa5lveb
oShm5ac5zEDyrX14mQ7ZA7huwd60ALoszTMl+N8ZeT9j/GUL+IQftt+pC4RZaqL2
/sWFp1qkppB+ymqWZoqo4TCEIatGrmtWPXhblaDPStgm5Kfs2De8PsNy0wdLpCPR
sKt2+jz3zCqBQ1EE1tMR04ypD+DKWdgvV+8ckk30WchtMc9zIS3A89SbvyI0KmSm
FoFLZ1FCmVd7jWeWvFF2Imc8Wl2cvhmOHBGB/7cVQ5cGvq3EarlTpXH3sYcXH5zN
VMrQ+aOWXkCGciwawJFGDp61/VqNHPQUQC7eMJ/ky/OOEIZ77DCb7U/H3ZtYxB+F
BT9fE07W29CigndrgqvsdJrIMNh66Obm5yrgAeYsmF6Qt97V1NWOqSzewT9GxVN/
IcIx30oCsGcFr4GL+jPBeKkkrEqNFQIEquuReZWjl/Dr0f9v1iyE1Fq88LvFMbvY
x2+MJ/V+BAFj28ECsVH9MTnMD1h9yYJ3hIJ6xKsGCbKJWNY9PwD7ik81Rv89shDh
cPkxqVA4q0I=
=c3iS
-----END PGP SIGNATURE-----

--XsQoSWH+UP9D9v3l--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050530104622.GA59664>