Skip to content

Instantly share code, notes, and snippets.

@AstmDesign
Created June 20, 2022 14:43
Show Gist options
  • Save AstmDesign/21c7a3b14e7c42bde8712c3ce6e00db0 to your computer and use it in GitHub Desktop.
Save AstmDesign/21c7a3b14e7c42bde8712c3ce6e00db0 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# World time zones
# Created by Astm Ali | https://github.com/astmdesign
#
# for time zones -> https://www.zeitverschiebung.net/en/city/5332748
# %H ---> for Hours
# cat /etc/timezone ---> Get current time zone
# echo 'Cairo, Egypt:' $(date +"%a %d %B %y %I:%M:%S %P")
# date -d "+5 hours"
# echo 'Texas, USA: ' $(TZ=America/Chicago date +"%c")
# Define my script path
# export current_path=$(pwd)'/times.sh'
echo '-------------------------------------------------'
echo '⌚ Cairo, Egypt: ' $(date +"%c")
echo ''
echo '⌚ California, USA:' $(TZ=America/Los_Angeles date +"%c")
echo ''
echo '⌚ New York, USA: ' $(TZ=America/New_York date +"%c")
echo ''
echo '⌚ Kolkata, Indea: ' $(TZ=Asia/Kolkata date +"%c")
echo '-------------------------------------------------'
sleep 1s
clear
# Recall the same script again
source /home/astm/times.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment