Make the %s format (seconds since the epoch) work for a negative
authorJim Meyering <jim@meyering.net>
Fri, 19 Aug 2005 09:21:57 +0000 (09:21 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 19 Aug 2005 09:21:57 +0000 (09:21 +0000)
commit995cff88f34bfe3b633a1597094ba5a6fd5bcf16
tree278499780a595eb4629d0c37c1515bb4cd83a45d
parent14c9d993f42ffa31223c4c6c083c7c958c305da2
Make the %s format (seconds since the epoch) work for a negative
number and when used with a zero-padded field width, e.g. %015s.

(my_strftime): Move the `do_number_sign_and_padding'
label so that it precedes the code to set `digits'.  Otherwise,
%0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
print `00-22'.  Now, it prints `-0022', as it should.
lib/strftime.c