The Real-time clock (RTC) which is also referred to as the hardware clock is independent of the operating system and continues to run even when the server is shut down. To display timezone execute # timedatectl | grep "Time" Set the Local-rtc Depending on your Linux distribution, this command will vary: Ubuntu and Mint - sudo dpkg-reconfigure tzdata followed by the admin/user password. Select the Terminal program from your Linux programs, or press Ctrl + Alt + T on your keyboard. If you know, the specific time zones set it using the name using the following command # timedatectl set-timezone America/Los_Angeles Using the Timezone Selection Menu 1 Open Terminal. Recommended timezone for servers is UTC as it doesn't have daylight savings. The above command will present a scrollable format. The first thing to do is to list all the region’s time zones using the list-time zones option or grep to make the command easy to understand # timedatectl list-timezones Here are some examples : $ date +”%a %b %d %y”įriday Decem00:30:37 $ date +”%A %B-%d-%Y %c”įriday December-06-2013 12:30:37 AM WIB List/Change time zoneĬhanging the time zone is crucial when you want to ensure that everything synchronizes with the Network Time Protocol. bit danh sách timezone mà server ang h tr s dng command sau: timedatectl list-timezones. Kt qu sau khi i timezone v Vietnam: Asia/HoChiMinh. You can also put the day name if you want. Trên Linux Server ( CentOS / RHEL 7 ), các bn s dng command sau: timedatectl set-timezone Asia/HoChiMinh.
How to change timezone linux rhel 6 plus#
To create custom date format, use a plus sign (+) $ date +”Day : %d Month : %m Year : %Y” The accepted format is 'YYYY-MM-DD', 'YYYY' represents the year, 'MM' the month in two digits and 'DD' for the day in two digits.Ĭhanging the date to '15 January 2019', you should use the following command: # timedatectl set-time 20190115 Create custom date format You can use timedatectl to set the time and the date respectively. Please note, that you must have root privilege to do this. It will set your current date and time of your system into 'January 25, 2014' and '09:17:00 AM'. If for some reason you have to change it manually using date command, we can use this command : # date -set=”20140125 09:17:00” Generally, you want your system date and time is set automatically. To change the locale to either AM or PM use the %p in the following format. From the command line, use date command as follows # date +%T -s "10:13:13" Setting the time to 09:08:07 use the command as follows (using the timedatectl) # timedatectl set-time 09:08:07 using date commandĬhanging time means all the system processes are running on the same clock putting the desktop and server at the same time. HH stands for the hour in 24-hour format, MM stands for minutes and SS for seconds. We use the timedatectl to change system time using the format HH:MM: SS. Checking on the status of the time on your system as well as the present time settings, use the command timedatectl as shown # timedatectl