Paste: http://www.rcz.cn/Default.aspx? Tabid = 262 & entryid = 52
Linux uses two types of time: World Time (GMT) and local time ). World time is GMT. Users in each time zone obtain the local time based on the difference between the time zone and the international time. For example, China is in the East 8 zone (CST +), so the local time is 8 hours faster than the international time.
The command for setting the time zone in Debian is tzconfig.
Linux loads the BIOS time every time it starts, and writes the time back to the BIOS when it exits. By default, Linux considers the time in BIOS as World Time (UTC ). Therefore, it reads the world time and calculates the local time according to the user's time zone. For China, 8 hours is added. This mechanism may cause problems in a multi-system environment: Because Windows only knows the local time, the time you set in Windows (will be written back to BIOS) is considered as world time in Linux, as a result, the Linux local time is faster than the correct time by 8 hours (for China ). If you change the local time minus 8 hours in Linux (the world time will also be reduced by 8 ), it will lead to an eight-hour delay in Windows (because Linux will write the modified world time back to BIOS when it exits) (I used VMware and checked the BIOS, indeed, haha ).
In Debian, the solution is to edit the file/etc/default/RCs and change the UTC = YES option to UTC = No (that is, let Linux think that the BIOS is local time ). Then set the correct local time in the BIOS.
Modification time
In RedHat:
Date-s mmddhhmmyyyy
In Debian:
Date-s "yyyy/mm/dd hh: mm: SS"
Or
Date-s 'yyyy/MM/dd hh: mm: ss'
Or
Date-s mm/DD/YYYY
Date-s hh: mm: SS