summaryrefslogtreecommitdiffstats
path: root/PCBSD/pc-sysinstall/backend-query/list-tzones.sh
blob: 38bae919dc2051257edefb45dd9da68186671560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

rm ${TMPDIR}/.tzonetmp >/dev/null 2>/dev/null

# Backend script which lists all the available timezones for front-ends to display
while read line
do
  echo "$line" | grep "^#" >/dev/null 2>/dev/null
  if [ "$?" != "0" ]
  then
    echo "$line" |  tr -s "\t" ":" | cut -d ":" -f 3-4 >>${TMPDIR}/.tzonetmp
  fi
done < /usr/share/zoneinfo/zone.tab

sort ${TMPDIR}/.tzonetmp
rm ${TMPDIR}/.tzonetmp >/dev/null 2>/dev/null

exit 0
OpenPOWER on IntegriCloud