I need to change the date of my system. I'm running a Linux CentOS 5.6.
# date +%Z UTC # date Thu Oct 6 11:42:45 UTC 2011
How do I change the hour to be UTC/GMT +1?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
The normal way is to set your timezone. There are a bunch of files stored by region in the following directory:
Take a look and find the one which matches your region. Then you have to create a symlink from
sudo rm /etc/localtime sudo ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
You need to change the timezone.
To do it system-wide, symlink
/etc/localtime to the apropriate file in
/usr/share/zoneinfo. For example:
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
In CentOS, you might need to also edit
To change the timezone just for the current user, set $TZ instead:
date -u must always return correct UTC time.