102-500 practice question 22 of 30

Why is the correct configuration of a system's time zone important?

Full set: 233 questions
Answer options
A: Because the conversion of Unix timestamps to local time relies on the time zone configuration. Correct answer
B: Because the time zone is saved as part of the modification times of files and cannot be changed after a file is created.
C: Because the environment variables LANG and LC_MESSAGES are, by default, set according to the time zone.
D: Because NTP chooses servers nearby based on the configured time zone.
Correct Answer:
A. Because the conversion of Unix timestamps to local time relies on the time zone configuration.
Explanation

The system's hardware clock and kernel often maintain time in Coordinated Universal Time (UTC). A Unix timestamp is the number of seconds elapsed since the UTC epoch (1970-01-01 00:00:00 UTC). The configured time zone is essential for system libraries and applications to correctly translate this absolute UTC timestamp into a human-readable local date and time for display to users, in log files, and for scheduling tasks like cron jobs.

Why Incorrect

B. File modification times are stored as UTC-based Unix timestamps. The time zone is only applied during display, so changing the system's time zone changes the displayed time.
C. Locale variables (LANG, LC) control language and formatting conventions. They are configured independently of the system's time zone.
D. NTP synchronizes the system clock to a UTC source and is time zone agnostic. NTP server selection is based on network proximity or manual configuration, not the local time zone.

References

1. The Single UNIX Specification, Version 3 (IEEE Std 1003.1-2001), System Interfaces, localtime(). The specification describes how timet (an arithmetic type for time in seconds since the Epoch) is converted to a broken-down local time, a process dependent on the time zone.

2. Red Hat Enterprise Linux 8 Documentation, Chapter 18. "Configuring basic system settings". Section 18.5 "Configuring the date and time" explains the relationship between UTC, local time, and the time zone setting.

3. timedatectl(1) man page. It describes how timedatectl manages the system time and date, explicitly distinguishing between the "Universal time" (UTC) and the "Local time," which depends on the configured "Time zone."

Scroll to Top