config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

world-time (683B)


      1 #!/bin/sh
      2 
      3 readonly FORMAT='+%Y-%m-%d %u/7 %H:%M %Z'
      4 
      5 now="@$(date +%s)"
      6 
      7 printf "%-11s %s\n" \
      8        "Los Angeles" \
      9        "$(TZ="America/Los_Angeles" date -d "${now}" "${FORMAT}")"
     10 
     11 printf "%-11s %s\n" \
     12        "New York" \
     13        "$(TZ="America/New_York" date -d "${now}" "${FORMAT}")"
     14 
     15 printf "%-11s %s\n" \
     16        "UTC" \
     17        "$(TZ="UTC" date -d "${now}" "${FORMAT}")"
     18 
     19 printf "%-11s %s\n" \
     20        "Napoli" \
     21        "$(TZ="Europe/Rome" date -d "${now}" "${FORMAT}")"
     22 
     23 printf "%-13s %s\n" \
     24        "上海" \
     25        "$(TZ="Asia/Shanghai" date -d "${now}" "${FORMAT}")"
     26 
     27 printf "%-11s %s\n" \
     28        "Sydney" \
     29        "$(TZ="Australia/Sydney" date -d "${now}" "${FORMAT}")"