X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/6962f268e8b908ab320dd101d19ac7e0366234d1..ccf85e7b74070d40af992d587210f61149f4360f:/unitproc/bktemp-dateTimeShort diff --git a/unitproc/bktemp-dateTimeShort b/unitproc/bktemp-dateTimeShort index b469d32..cabb4ba 100644 --- a/unitproc/bktemp-dateTimeShort +++ b/unitproc/bktemp-dateTimeShort @@ -35,13 +35,15 @@ dateTimeShort(){ # Construct and deliver separator-les date string TIME_CURRENT_SHORT="$(date -d "$TIME_INPUT" +%Y%m%dT%H%M%S%z)"; echo "$TIME_CURRENT_SHORT"; -} # Get date&time without separators +} # Get YYYYmmddTHHMMSS±zzzz #==BEGIN sample code== echo "The current day and time is :$(dateTimeShort)"; echo "Contact lost with STS-107 on:$(dateTimeShort "2003-02-01T08:59:15-05:00")"; echo "Bitcoin started on :$(dateTimeShort "@1231006505")"; - +testDate="2020-07-07T02:30:11,690097074+00:00"; +echo "This string was generated using 'date --iso-8601=ns':$testDate"; +echo "Using dateTimeShort, it appears as:$(dateTimeShort "$testDate")"; #==END sample code== # Author: Steven Baltakatei Sandoval