Timezone or timezone plays an important role in a vps server, because on average every time we install Linux OS on a vps, the default timezone that will be used is UTC ± 00 (Universal Time). So, those of us who are in Indonesia certainly use the time between WIB (UTC + 07: 00), WITA (UTC + 08: 00) or WIT (UTC + 09: 00). If we do not set the timezone according to the location we want, all time recording on our server will use the universal time format. Surely it will make developers confused if they see the date on a file, log or something else. Therefore here I will share information about how to set timezone on linux. we will use the timedatectl
command to set it up.
Check the linux timezone
timedatectl
Can be seen in the Time zone section. As in the example in the picture, the format is UTC.
Check the list of available timezone
timedatectl list-timezones
Or if you want to be more specific, for example, we want to check the timezone for WIB (UTC + 07: 00) which is based on Jakarta, we can use the command
timedatectl list-timezones | grep Jakarta
Set the Linux time zone
timedatectl set-timezone "Asia/Jakarta"
Run this command to change the time zone to WIB (UTC + 07: 00), you can adjust it according to the time zone you want. Then next you can check it again and the time zone has changed.
Yep, that’s the information I can share about how to set timezone on Linux. Hopefully this brief information can be useful, Thank you: smile:
Also Read :
- How to Import Database in MySQL Docker
- How to Install 7zip on Linux
- How to Install JMeter on Ubuntu 20.04