Change timezone in Centos 7
You set up a machine – but you set the wrong timezone, how to fix it?
First confirm the current timezone
[root@mysystem ~]# date Mon Jun 3 09:08:58 CDT 2019
We will use the tool timedatect to change it. Now – we need to find the correct zone to use. We can list the available zones by using the command
[root@mysystem ~]# timedatectl list-timezones
but we will end up with a huge long list – so to narrow things down, we will use the command:
[root@mysystem ~]# timedatectl list-timezones | grep America America/Adak America/Anchorage America/Anguilla America/Antigua America/Araguaina America/Argentina/Buenos_Aires America/Argentina/Catamarca America/Argentina/Cordoba America/Argentina/Jujuy America/Argentina/La_Rioja America/Argentina/Mendoza America/Argentina/Rio_Gallegos America/Argentina/Salta America/Argentina/San_Juan (and many more after this)
The one I need is America/New_York so now I will issue the command: [root@mysystem ~]# timedatectl set-timezone America/New_York [root@mysystem ~]# date Mon Jun 3 10:15:13 EDT 2019
and now I am in EDT!!