Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #How to set timezone in linux... really... this method works!
- #/KNOPPIX/knoppix.sh
- #set "localtime" timezone
- #remove original "timezone link"
- rm -f /etc/localtime
- #create link from your preferred timezone file to "timezone link" example:
- ln -s /usr/share/zoneinfo/Europe/Budapest /etc/localtime
- # setup for EDT and EST (+4 EDT; +5 EST)
- #ln -s /usr/share/zoneinfo/EST5EDT /etc/localtime
- # setup for only EST (+5 EST)
- #ln -s /usr/share/zoneinfo/EST /etc/localtime
- # setup for only Daylight Saving Time
- #ln -s /usr/share/zoneinfo/EDT /etc/localtime
- #...
- #here is how to set "timezone environment variable" in a terminal to GMT for example
- # (console GMT, x budapest time)
- #echo '"TZ=GMT"; export TZ;' > /home/knoppix/.profile
- #echo '"TZ=GMT"; export TZ;' > /root/.profile
- #setting "systemwide timezone" (budapest time, hwclock GMT) (this sets the time in xorg too if you do this before starting x server!)
- rm /etc/timezone
- echo "Europe/Budapest" > /etc/timezone
- export TZ="/usr/share/zoneinfo/Europe/Budapest"
- # setup local timezone "US/Eastern" - "America/New_York"
- echo "US/Eastern" > /etc/timezone
- export TZ="/usr/share/zoneinfo/America/New_York"
- #now set your hardware clock preferably to GMT time...
- #set gmt time and date with example:
- #date -u --set "2014-08-24 03:18:00+00"
- #Sun Aug 24 03:18:00 UTC 2014
- #show local time
- #root@Microknoppix:/media/sda2/KNOPPIX# date
- #Sun Aug 24 05:19:50 CEST 2014
- #show gmt time
- #root@Microknoppix:/media/sda2/KNOPPIX# date -u
- #Sun Aug 24 03:19:53 UTC 2014
- #you can use the tzselect tool for selection of timezone in a script
- #tzselect
- #synchronize hw clock
- #hwclock --hctosys
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement