Re: [PATCH] Pretty-print date in 'git log'
- From
- Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
- Date
- Apr 18, 2005, 19:57 UTC
- Message-ID
- <E1DNcMp-0006sk-00@skye.ra.phy.cam.ac.uk>
- In-Reply-To
- <1113850922.23938.54.camel@orca.madrabbit.org>
> ray:~/work/home$ date -ud 'jan 1, 1970 + 1111111111 seconds' > Fri Mar 18 01:58:31 UTC 2005 > ray:~/work/home$ date -ud 'jan 1, 1970 + 1111111111 seconds + 0800' > Fri Mar 18 09:58:31 UTC 2005
I sent David a short script to do almost that, except that mine needed to negate the timezone whereas yours elegantly changes +0800 to + 0800
In your 2nd example, you'll need 'sed' to replace UTC (or +0000 if using -R) in the output by +0800, because the 1111111111 is the UTC seconds, so the actual time is Fri Mar 18 01:58:31 UTC 2005 (as given by your first example).
-Sanjoy