given: 20230607013934 -04 hours (because my computer is EDT?) output: 202306062139.34 2023 06 07 01 39 34 2023-06-07 01:39:34 2023-06-07 01:39:34-0400 # 20230607013934 GIVEN=20230607013934 GIVEN_DATE=$(echo $GIVEN | sed 's/\(....\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1-\2-\3 \4:\5:\6/') # 2023-06-07 01:39:34 UTC="$(date -d "$GIVEN_DATE"Z +%Y%m%d%H%M.%S)"