INIT(5) | File Formats and Configurations | INIT(5) |
init
, TIMEZONE
— set default system time zone and locale
/etc/default/init
/etc/TIMEZONE
This file sets the time zone environment variable
TZ
, and the locale-related environment variables
LANG
, LC_COLLATE
,
LC_CTYPE
, LC_MESSAGES
,
LC_MONETARY
, LC_NUMERIC
and
LC_TIME
.
It can also be used to set any additional environment variables which should be present in all processes started by init(8) or svc.startd(8), and in any zoneadmd(8) daemons started automatically to support zone operations.
The format of the file is a set of tokens of the form:
VAR=value
where VAR is an environment
variable and value is the value assigned to the
variable. value can be enclosed in double quotes
(") or single quotes ('), however, these quotes cannot be part of the
value. Neither VAR nor value may
contain whitespace. Multiple
VAR=value
pairs can occur on the same line, separated by whitespace or a semicolon
(;), but, for compatibility with existing software, the
TZ
variable
must appear on its
own line with no leading whitespace. Comments are supported; each comment
must be on its own line and begin with a hash (#) character.
If the CMASK
variable is specified, it is
not passed to the environment but the value is used to set the initial umask
that init(8) uses and that every other
process inherits. The CMASK
value is specified in
octal and must be between 000 and 077 to be accepted; the value is silently
ignored otherwise. If the value is missing or cannot be parsed as an octal
number, then a value of 0 is assumed. A sequence of valid octal digits
followed by other trailing characters will be treated as if the trailing
characters were not present.
For init(8), the number of environment variables that can be set is limited to 20.
/etc/TIMEZONE is a symbolic link to /etc/default/init. This link exists for compatibility with legacy software, is obsolete, and may be removed in a future release.
ctime(3C), environ(7), init(8), rtc(8), svc.startd(8), zoneadmd(8)
When changing the TZ
setting on x86
systems, you must make a corresponding change to the
/etc/rtc_config file to account for the new timezone
setting. This can be accomplished by executing the following commands,
followed by a reboot, to make the changes take effect:
# rtc -z zone-name # rtc -c
where zone-name is the same name as the
TZ
variable setting.
See rtc(8) for more information.
November 7, 2021 | OmniOS |