Most of the current cluster software requires a time difference of no more than 1000 seconds between multiple machines. Therefore, if you use the date command to modify the time, this is not much to say. However, sometimes the time of the two machines is the same, but the time zone is different, the user has to modify the time zone of the machine, which is different in different operating systems, the following describes how to change the time zone of mainstream operating systems:
Solaris: in solaris, the/etc/TIMEZONE file needs to be modified to modify the time zone. The TZ = PRC indicates the China time zone. We can replace it with TZ = US/Pacific, restart the machine and change the time zone to the US Pacific time zone. Note the following three points: 1. On the X86 machine, run the following command to update the/etc/rtc_config file: # rtc-z zone-name (the zone-name here is the TZ value in/etc/TIMEZONE) # rtc-c2. How many time zones can be selected? We can enter the/usr/share/lib/zoneinfo Directory, which contains many directories, including US and many files, such as PRC. This indicates that there are many time zones in US, the PRC is the unified time zone. That's why we see the two different forms of TZ = PRC and TZ = US/Pacific. 3. restart the system to make it take effect.
Linux (Redhat and Suse): 1. query the name of the time zone to be changed in the/usr/share/zoneinfo/directory. modify the format as above 2 and remove the original localtime file; # mv/etc/localtime/etc/localtime-old3, make a new localtime file, link the corresponding time zone file # ln-s/usr/share/zoneinfo/Asia/Shanghai/etc/localtime4, in sync with hardware #/sbin/hwclock -- systohc
AIX: 1, view the current time zone (other operating systems are the date command) cat/etc/environment (find the row where TZ Is located) 2, for the sake of safety, we recommend that you use smit to modify the time zone smit chtz3. All the time zone information is in the/usr/share/lib/zoneinfo directory.
HPUX: 1, # set_parms timezone. You can change the time zone through interaction. For all Unix systems (excluding Linux), you can use echo $ TZ to view the current time zone. Author qinggzha