summaryrefslogtreecommitdiff
path: root/ar/.local/bin/timezones
blob: 206f8da9a47b5e5fd12bc068fb6c7156b227fd9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e

[ "$1" != "" ] && time=$1 || time=''

printDate() {
  [ "$time" != "" ] && message="$(TZ=$2 date +'%a, %d %b %H:%M' -d "$time $(date +%Z)")" || message="$(TZ=$2 date +'%a, %d %b %H:%M')"
  notify-send "$1" "$message"
}

printDate "Los Angeles" America/Los_Angeles
printDate "New York" America/New_York
printDate "London" Europe/London
printDate "Berlin" Europe/Berlin
printDate "Moscow" Europe/Moscow
printDate "Bangkok" Asia/Bangkok
printDate "Hong Kong" Asia/Hong_Kong
printDate "Macau" Asia/Macau
printDate "Seoul" Asia/Seoul
printDate "Tokyo" Asia/Tokyo