File: settimezone

package info (click to toggle)
whereami 0.3.36
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 424 kB
  • sloc: sh: 1,094; perl: 524; makefile: 24
file content (11 lines) | stat: -rwxr-xr-x 237 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
#
# Set timezone - contributed by Itay Ben-Yaacov
#

timezone=$1

if [ -f /usr/share/zoneinfo/$timezone ]; then 
  echo $timezone > /etc/timezone
  rm -f /etc/localtime && ln -sf /usr/share/zoneinfo/$timezone /etc/localtime
fi