summaryrefslogtreecommitdiff
path: root/templates/system/time-zone/node.def
blob: 72ca791e47eb9f8956d72b64def15c47f65e23e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
type: txt
help: "Configure local timezone"
default: "GMT"
update: "LTF=\"/usr/share/zoneinfo\" && \
case \"$(@)\" in \
  [Ll][Oo][Ss]*) LTF=\"\\\$LTF/US/Pacific\" ;; \
  [Dd][Ee][Nn]*) LTF=\"\\\$LTF/US/Mountain\" ;; \
  [Hh][Oo][Nn]*) LTF=\"\\\$LTF/US/Hawaii\" ;; \
  [Nn][Ee][Ww]*) LTF=\"\\\$LTF/US/Eastern\" ;; \
  [Cc][Hh][Ii]*) LTF=\"\\\$LTF/US/Central\" ;; \
  [Aa][Nn][Cc]*) LTF=\"\\\$LTF/US/Alaska\" ;; \
  [Pp][Hh][Oo]*) LTF=\"\\\$LTF/US/Arizona\" ;; \
  *) LTF=\"\\\$LTF/Etc/$(@)\" ;; \
esac && \
sudo ln -fs \\\$LTF /etc/localtime"
delete: "sudo ln -fs /usr/share/zoneinfo/GMT /etc/localtime"
#allowed: local -a list=( "Los Angeles" "New York" "Denver" "Chicago" \
#                         "Anchorage" "Honolulu" "Phoenix" "GMT" )
#         for (( i = -1; i > -13; i-- )); do
#           list[${#list[@]}]="GMT$i";
#         done
#         for (( i = 1; i < 13; i++ )); do
#           list[${#list[@]}]="GMT+$i";
#         done
#         for zone in "${list[@]}"; do
#           echo \"$zone\"
#         done
#comp_help:Enter one of the following time zones:
#  Honolulu   Anchorage   Los Angeles   Phoenix   Denver   Chicago   New York
#  GMT   GMT-1 ... GMT-12   GMT+1 ... GMT+12