Make the %s format (seconds since the epoch) work for a negative
authorJim Meyering <jim@meyering.net>
Wed, 17 Aug 2005 19:55:52 +0000 (19:55 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 17 Aug 2005 19:55:52 +0000 (19:55 +0000)
commitcb3da21f16309f23b7c2a6010b85e7c6d00ef489
treed128e9c9a28dab47ada5bb29cf628e330b90b5be
parent6a18f2232d81d1c73436f006617617a35582a4be
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