Thursday, April 7, 2016

set local time on ubuntu

http://manpages.ubuntu.com/manpages/saucy/man3/DateTime::TimeZone::Catalog.3pm.html
http://stackoverflow.com/questions/5971635/setting-reading-up-environment-variables-in-python

import os, time
time.strftime('%X %x %Z')
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
time.strftime('%X %x %Z')


# Note: Install and check ntp:
apt-get install ntp
Type ntpdc -c peers into terminal. Or ntpdc -p should do it as well.


No comments:

Post a Comment