

#Geektool mojave how to
How to calculate – on one line – the number of days that have passed since a particular date? The stock macOS date can’t do it echo \( `/usr/local/bin/gdate +%s -date=today` - `/usr/local/bin/gdate +%s -date=` \) / 86400 | bc If you display multiple timezones you’ll quickly come to realize that the minutes portion of the time is the same across most timezones, so what I actually use is TZ=America/Los_Angeles date +"PST %H" TZ=America/New_York date +"EST %H" TZ=Asia/Dubai date +"Dubai %H" TZ=Asia/Kolkata date +"Kolkata %H:%M" TZ=Asia/Jakarta date +"Jakarta %H" TZ=Asia/Shanghai date +"Chengdu %H" So when you pick up your laptop and travel through a bunch of timezones (and your local time changes) the hardcoded offset doesn’t steer you wrong. TZ=":Asia/Calcutta" date +"India %a %H:%M" So I hardcoded the offset values: date -j -v+12H -v+30M +"India %a %H:%M"Ī better, proper, portable way is to specify the actual timezone in which you’re interested.


Time elsewhereĬoworkers in India – how to keep track of their day and night? They’re 12.5 hours ahead of where I lived (in California). Note please there’s a significant difference between a straight quote ' and a back-quote (or back-tick) `. Specify an appropriate refresh interval, in seconds. Within GeekTool drag a “shell” object onto the desktop and paste the UNIX command line into the “command” field. GeekTool is a fabulously easy way of displaying images from the web and the output of UNIX commands on your Mac’s desktop.
