Time

Time Zone

Time zone is stored in /etc/timezone file. Running /usr/bin/tzselect will help you find your time zone but doesn't update your system.

Setting Time Zone on system wide

run tzconfig

UTC

Once you've set your timezone you might wish to change the UTC setting, upon Debian machines you can find that in the /etc/default/rcS file. Although changing this will require a reboot. I think, hwclock --systohc --utc command (in case UTC=yes) could be used instead of reboot.

NTP

#!/bin/bash /usr/sbin/ntpdate -s /sbin/hwclock --adjust /sbin/hwclock --systohc
  1. apt-get -y install ntpdate
  2. echo "ntpdate -b pool.ntp.org" > updateTime.sh
    chmod +x updateTime.sh
    sh updateTime.sh