bug-coreutils
[Top][All Lists]
Advanced

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

bug#40586: date and '%-N' does not appear to remove leading zeros anymor


From: Drake Jacovian
Subject: bug#40586: date and '%-N' does not appear to remove leading zeros anymore, but trailing zeros.
Date: Sun, 12 Apr 2020 15:51:32 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Using...

date (GNU coreutils) 8.32

uname -a

Linux server 4.19.114-1-MANJARO #1 SMP Thu Apr 2 17:04:36 UTC 2020 x86_64 GNU/Linux


I have noticed that %-N when used with the data command no longer appears to always remove leading zeros, instead it appears to be removing trailing zeros? Obviously, removing trailing zeroes will changes it value.
From the date manual '(hyphen) do not pad the field'
As an example of this...

for i in {1..100}; do date +'%-N'; sleep 0.01; done

...can return the following values.

975014256
98960514
004239247
018627712
032860182
047079472
061412362
075671305
090001272
104960757
119612273
134225597
148815084
163728277
17841512
19301887
207621036







reply via email to

[Prev in Thread] Current Thread [Next in Thread]