LX0-104 · Question #41
Why is the correct configuration of a system's time zone important?
The correct answer is A. Because the conversion of Unix timestamps to local time relies on the time zone configuration.. The correct configuration of a system's time zone is crucial because it enables the accurate conversion of universal Unix timestamps into human-readable local times. Without it, time displays for logs, files, and applications would be incorrect relative to the user's geographical
Question
Options
- ABecause the conversion of Unix timestamps to local time relies on the time zone configuration.
- BBecause the time zone is saved as part of the modification times of files and cannot be changed
- CBecause the environment variables LANG and LC_MESSAGES are, by default, set according to
- DBecause NTP chooses servers nearby based on the configured time zone.
How the community answered
(51 responses)- A86% (44)
- B8% (4)
- C4% (2)
- D2% (1)
Why each option
The correct configuration of a system's time zone is crucial because it enables the accurate conversion of universal Unix timestamps into human-readable local times. Without it, time displays for logs, files, and applications would be incorrect relative to the user's geographical location.
Unix timestamps store time as the number of seconds since the epoch (January 1, 1970, 00:00:00 UTC). To display this universal timestamp in a local, human-readable format, the system needs to know the configured time zone and any applicable Daylight Saving Time rules for conversion.
File modification times are typically stored as Unix timestamps (UTC) or relative to UTC, not as a combination that includes the time zone itself. The time zone only affects how these timestamps are displayed.
`LANG` and `LC_MESSAGES` environment variables primarily control language, locale, and message formatting, not time zone settings directly. Time zone is usually controlled by `TZ` or system settings.
NTP synchronizes with time servers based on IP connectivity and stratum levels, not based on the client's configured time zone. The time zone is irrelevant to the process of obtaining UTC from an NTP server.
Concept tested: Time zone impact on display
Source: https://linux.die.net/man/7/time
Topics
Community Discussion
No community discussion yet for this question.