X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/fc1495ab3996d2ded45e6e5ef71d1d256f5eede0..b03c9c0cb585665d2a6c67feabd38040cfa7069a:/unitproc/bktemp-dateShort diff --git a/unitproc/bktemp-dateShort b/unitproc/bktemp-dateShort index 425cf85..2608645 100644 --- a/unitproc/bktemp-dateShort +++ b/unitproc/bktemp-dateShort @@ -6,6 +6,7 @@ dateShort(){ # Desc: Date without separators (YYYYmmdd) # Usage: dateShort # Output: stdout: date (ISO-8601, no separators) + local TIME_CURRENT DATE_CURRENT_SHORT TIME_CURRENT="$(date --iso-8601=seconds)" ; # Produce `date`-parsable current timestamp with resolution of 1 second. DATE_CURRENT_SHORT="$(date -d "$TIME_CURRENT" +%Y%m%d)"; # Produce separator-less current date with resolution 1 day. echo "$DATE_CURRENT_SHORT";