Created
February 23, 2022 00:09
-
-
Save sillygwailo/1f71c66531311afc51dba45d7f652d96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Enter a time using 24H. 1:30pm is 13:30 . | |
ENTERTIME="%filltext:name=Time (in 24H)%" | |
# See https://gist.github.com/palaniraja/f8e21e8c66eac7e1b313 for a | |
# list of time zone names. | |
T1=$(TZ="America/New_York" date -jf "%H:%M %z" "$ENTERTIME $(date "+%z")" "+%-I:%M %p %Z" | tr -s '[:lower:]' '[:upper:]') | |
T2=$(TZ="Asia/Calcutta" date -jf "%H:%M %z" "$ENTERTIME $(date "+%z")" "+%-I:%M %p %Z" | tr -s '[:lower:]' '[:upper:]') | |
echo -n "$T1 / $T2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment