X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/17d7b80328e653a7d65c4aac24c4f8173409c321..0d22dfcdb7eab1975d56ed36967885707470c828:/user/bkdate?ds=sidebyside diff --git a/user/bkdate b/user/bkdate new file mode 100755 index 0000000..1bf808b --- /dev/null +++ b/user/bkdate @@ -0,0 +1,16 @@ +#!/bin/bash + +# Date: 2020-02-06T22:51Z + +# Description: A simple command line tool to dispay the date in ISO-8601 format. + +DATE="$(date --iso-8601=seconds)" + +if [[ $DATE =~ "+00:00"$ ]]; then + DATE2=${DATE::-6}"Z" + echo $DATE2 + exit 0 +else + echo $DATE + exit 0 +fi