Courseiva
mediumMultiple Choice

XK0-006 Practice Question: A web server in a remote data center logs…

A web server in a remote data center logs timestamps in UTC, but the operations team wants all logs to reflect the local timezone (America/New_York). Which command changes the system timezone?

⚠ Common exam trap

Watch out — candidates often confuse setting the timezone with setting the time or enabling NTP, leading them to choose options that adjust the clock rather than the timezone, which does not solve the requirement for local timestamps in logs.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

timedatectl set-timezone America/New_York

The `timedatectl set-timezone` command is the correct way to change the system timezone on a Linux system using systemd. By specifying 'America/New_York', the system will adjust all timestamps to Eastern Time, including those generated by the web server, ensuring logs reflect the local timezone.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    timedatectl set-time '2025-03-01 12:00:00'

    Why it's wrong here

    timedatectl set-time sets the system clock to a literal value; it does not change the timezone, so log timestamps stay in UTC. It is tempting because it visibly alters system time, but it is correct when correcting clock drift, not when reconfiguring the timezone.

  • ✓

    timedatectl set-timezone America/New_York

    Why this is correct

    The timedatectl utility controls systemd's clock settings, and set-timezone writes the named zone to /etc/localtime, so America/New_York offsets are applied to logged timestamps. This satisfies the requirement to convert the server's UTC logging to the operations team's local timezone.

  • ✗

    timedatectl list-timezones

    Why it's wrong here

    timedatectl list-timezones only prints available timezone names; it changes nothing, so the system remains on UTC. It is tempting because it is the first step when selecting a timezone, but it is correct as a discovery command before running set-timezone.

  • ✗

    timedatectl set-ntp yes

    Why it's wrong here

    timedatectl set-ntp yes enables NTP synchronisation; it does not alter the configured timezone, so logs remain in UTC. It is tempting because it adjusts the system clock, but it is correct when the goal is keeping time accurate rather than changing the timezone.

About these practice questions

This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.