[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem printing 24 hour times
From: |
Greg Wooledge |
Subject: |
Re: Problem printing 24 hour times |
Date: |
Sat, 8 Jan 2022 10:29:00 -0500 |
On Sat, Jan 08, 2022 at 03:15:51PM +0000, Chris Elvidge wrote:
> I have got round the problem with tim24=$(date -d"$tim12" +"%-H%M") i.e.
> stripping leading zeros, but is there any way to force printf to recognise
> 0700 as a decimal number?
Either strip the leading zeroes, or force base 10 with
"$((10#$yourvariable))".