LX0-104 · Question #112
What is true about the file /etc/localtime?
The correct answer is D. It is either a symlink to or a copy of a timezone information file such as. The /etc/localtime file defines the system's local timezone and is typically a symbolic link or a copy of a timezone data file from the /usr/share/zoneinfo directory.
Question
Options
- AIt is a plain text file containing a string such as Europe/Berlin.
- BIt is created and maintained by the NTP service based on the geolocation of the system's IP
- CIt is a symlink to /sys/device/clock/ltime and always contains the current local time.
- DIt is either a symlink to or a copy of a timezone information file such as
How the community answered
(44 responses)- B5% (2)
- C2% (1)
- D93% (41)
Why each option
The /etc/localtime file defines the system's local timezone and is typically a symbolic link or a copy of a timezone data file from the /usr/share/zoneinfo directory.
It is a binary file containing timezone data, not a plain text file with a simple string.
NTP (Network Time Protocol) synchronizes system time but does not determine or maintain the timezone file based on geolocation.
It is not typically a symlink to /sys/device/clock/ltime; it links to a timezone data file in /usr/share/zoneinfo.
/etc/localtime is crucial for setting the system's timezone. It usually points to or contains a copy of a binary timezone database file, like /usr/share/zoneinfo/Europe/Berlin, which provides detailed information about time zone rules including daylight saving changes.
Concept tested: Linux system timezone configuration (/etc/localtime)
Source: https://linux.die.net/man/5/localtime
Topics
Community Discussion
No community discussion yet for this question.