zero pad date and month fields

This commit is contained in:
Mark Andrews
2014-05-01 11:41:32 +10:00
parent c2abd6efeb
commit 5b56f2e3cc
2 changed files with 2 additions and 2 deletions

View File

@@ -590,7 +590,7 @@ $NSUPDATE <<END > /dev/null 2>&1 || ret=1
update add new.yyyymmddvv.nil in a 1.2.3.4
send
END
now=`$PERL -e '@lt=localtime(); printf "%.4d%.2d%2d00\n",$lt[5]+1900,$lt[4]+1,$lt[3];'`
now=`$PERL -e '@lt=localtime(); printf "%.4d%0.2d%0.2d00\n",$lt[5]+1900,$lt[4]+1,$lt[3];'`
sleep 1
serial=`$DIG +short yyyymmddvv.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` || ret=1
[ "$oldserial" -ne "$serial" ] || ret=1