fix(unitproc):Fix local var decs in time-related templates
[BK-2020-03.git] / unitproc / bktemp-dateTimeShort
index d6491c1da1d7cc310af27d5567a33471513a0431..fe30617244007c98f47a3549f88556d5b5325d63 100644 (file)
@@ -6,10 +6,11 @@ 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";
-}
+} # Get date&time without separators
 
 #==BEGIN sample code==
 echo "The current day and time is:$(dateTimeShort)"