Created
February 19, 2018 06:24
-
-
Save celoyd/4b1bb324587af0a58d635d55314ee571 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
when() { | |
local zone="$1"; | |
case "$zone" in | |
("SF") zone="America/Los_Angeles";; | |
("CO") zone="America/Denver";; | |
("Montreal") zone="America/Montreal";; | |
("DC") zone="America/New_York";; | |
("BLR") zone="Asia/Kolkata";; | |
esac; | |
psql -At -c "select date_trunc('second', now() at time zone '$zone')"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment