![]() ![]() With /etc/localtime, you change the time zone by creating a symbolic link to a binary file that has the same name as the time zone in the /usr/share/zoneinfo directory. You'll need to use sudo because the root user owns the file.įor example, to edit it with vim: sudo vim /etc/timezone To change the time zone using /etc/timezone, you'd edit it with any text editor and place the time zone name you got earlier in that file. To find out which files you use on your system, consult your distribution's documentation. These files are usually set at installation, but you can change them afterward. Which file you'll use depends on which system you're running.ĭebian and Ubuntu systems use the former. ![]() Open Date & Time settings by searching for time from an Activities menu. For example, to change to the Los Angeles time zone, change the ZONE entry to the following. You can set just the date or only the time, depending on your needs. Replace YY-MM-DD with Year-Month-Day, and HH:MM:SS with Hour:Minute:Second. Change the date of the operating system by typing: sudo date -s YY-MM-DD HH:MM:SS. ![]() Locate the ZONE entry, and change it to the time zone file (omitting the /usr/share/zoneinfo section of the path). To display the date and time of the operating system use: date. If you want to make system-wide changes to the time zone, such as for a desktop system or a laptop that stays in one location, you can use the /etc/timezone and /etc/localtime files. Change Timezone using GUI Open Date & Time settings. You need to use sudo with your editor command because /etc/sysconfig/clock is owned by root. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |