Re: [PATCH] lib/timeutils: Add %s (seconds since the Epoch) to parse_timestamp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 07, 2022 at 09:20:48AM +0200, Karel Zak wrote:
> On Tue, Sep 06, 2022 at 07:31:07PM +0300, Péter Ujfalusi wrote:
> > On 06/09/2022 11:47, Karel Zak wrote:
> > > On Tue, Sep 06, 2022 at 10:04:36AM +0300, Peter Ujfalusi wrote:
> > >>  lib/timeutils.c | 8 ++++++++
> > >>  1 file changed, 8 insertions(+)
> > > 
> > > Applied, thanks.
> > 
> > After some tinkering with a script where I needed this, would it make
> > sense to change the way how one should be specifying seconds since the
> > Epoch time to
> > '@'<number>
> 
> Yes, '@' seems more readable. I have no strong opinion about it, maybe
> we can support both convention (with and without @).

I suggest supporting just @seconds, this would also match the behaviour of
date(1) and the gnulib module it uses:

$ date -u -d @1348331662
Sat Sep 22 16:34:22 UTC 2012


-- 
ldv



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux