From 304c5268e471df138cd2baa3e13c68b52ea5268e Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Thu, 2 Jan 2020 18:05:05 +0100 Subject: [PATCH] Cosmetic changes --- worldclock.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/worldclock.sh b/worldclock.sh index f9f3a66..24a3fc0 100755 --- a/worldclock.sh +++ b/worldclock.sh @@ -3,11 +3,9 @@ AS=🌏 EU=🌍 AM=🌎 NIGHT="🌙" -DAY="☀️ " - TZONES="America/Los_Angeles America/Denver America/New_York Europe/Amsterdam Asia/Tokyo Australia/Brisbane" -H=`date +%H` +H=`TZ=Europe/Amsterdam date +%H` if (test $H -gt 2 -a $H -lt 9); then WORLD=$AS elif (test $H -gt 9 -a $H -lt 18); then @@ -21,7 +19,7 @@ function print_clock() { TZ=$1 H=$(TZ=$1 date +%H) COLOR="" - if (test $H -gt 8 -a $H -lt 19); then + if (test $H -gt 8 -a $H -lt 18); then echo -n $WORLD COLOR="\033[1;33m" else @@ -32,7 +30,7 @@ function print_clock() { COLOR="\033[0;33m" fi - if (test $H -gt 19 -a $H -lt 23); then + if (test $H -gt 17 -a $H -lt 23); then COLOR="\033[0;36m" fi echo -ne "${COLOR} $1\r\t\t\t\t: "