#!/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