Setting Time Values in Non-Global Zones
You can set time values in non-global zones that are different from the value in the global zone by using the Network Time Protocol (NTP). Two features interact, the global-time
property for the zone and the sys_time privilege on the time-setting process. While you can set different times in non-global zones, if the time is changed in the global zone, the non-global zones time are offset by the same amount.
NTP can be run from any zone, affecting only the zone in which the command is run. When running NTP across a system with non-global zones that have different times, run NTP in the global zone to synchronize all the non- global zone clocks that just run at an offset. The effect of NTP changing the time through clock modulation in the global zone will transfer to a non global-zone as well.
-
When NTP is run inside the zone with
global-time
set tofalse
, the ntp_adjtime and adjtime system calls cannot be used to make corrections to the zone time. Whenglobal-time
is set tofalse
, NTP synchronizes the time by adjusting the clock to a given value. -
When NTP is run inside the zone with
global-time
set totrue
, NTP can modulate the system clock through the ntp_adjtime and adjtime system calls. Thetrue
setting preserves keeping system time in tight synchronization with the zone.
For more information about the global-time
property, see global-time Global Property (solaris and solaris10 Only) in Oracle Solaris Zones Configuration Resources. For information about setting the time, see the
date
(1) man page. For more information about privileges, see Privileges in a Non-Global Zone. For more information about adjtime and ntp_adjtime, see the
adjtime
(2) and
ntp_adjtime
(2) man pages.