X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/0f48af59d8759f8a46dfacf58758476ddbe2a3cf..324720391099ee98e22e06d7d499209efc72812c:/unitproc/bktemp-dateTimeShort?ds=sidebyside diff --git a/unitproc/bktemp-dateTimeShort b/unitproc/bktemp-dateTimeShort index dc470e0..fe30617 100644 --- a/unitproc/bktemp-dateTimeShort +++ b/unitproc/bktemp-dateTimeShort @@ -6,6 +6,7 @@ dateTimeShort(){ # Desc: Timestamp without separators (YYYYmmddTHHMMSS+zzzz) # Usage: dateTimeShort # Output: stdout: timestamp (ISO-8601, no separators) + local TIME_CURRENT TIME_CURRENT_SHORT TIME_CURRENT="$(date --iso-8601=seconds)" ; # Produce `date`-parsable current timestamp with resolution of 1 second. TIME_CURRENT_SHORT="$(date -d "$TIME_CURRENT" +%Y%m%dT%H%M%S%z)"; # Produce separator-less current timestamp with resolution 1 second. echo "$TIME_CURRENT_SHORT";