Identify the path used as the system-wide local time-zone setting and backed by zoneinfo data.
Which path is appropriate?
/etc/localtime is commonly a copy or symlink to the selected zoneinfo file and is read by local-time-aware programs.
Detailed explanation
/etc/timeIncorrect. /etc/time is not the standard time-zone path.
Incorrect. /etc/time is not the standard time-zone path.
/var/log/timezoneIncorrect. A log directory is not the zoneinfo setting.
Incorrect. A log directory is not the zoneinfo setting.
/usr/local/timeIncorrect. /usr/local/time is not the standard selection path.
Incorrect. /usr/local/time is not the standard selection path.
/etc/localtimeCorrect. /etc/localtime represents the selected local zone.
Correct. /etc/localtime represents the selected local zone.
Try it yourself
An example you can run in a temporary verification environment.
readlink /etc/localtime 2>/dev/null || file /etc/localtimeExpected result
zoneinfoへのリンク先またはtimezone dataの説明Key points
- /etc/localtime
- Source data under /usr/share/zoneinfo
- Copy or symlink
Notes
- Environment: POSIX readlinkまたはfile / 読み取りのみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.