Backend Development 13 min read

Time Zones, UTC, DST, and Their Impact on Game Development: Concepts, Checklist, and Testing Methods

This article explains GMT, UTC, time zones, local time, and daylight‑saving time, outlines their effects on game server and client logic, presents three common handling strategies, lists typical bugs, and provides a detailed testing checklist for reliable time‑related features.

NetEase LeiHuo Testing Center
NetEase LeiHuo Testing Center
NetEase LeiHuo Testing Center
Time Zones, UTC, DST, and Their Impact on Game Development: Concepts, Checklist, and Testing Methods

The article begins by defining key time concepts: GMT (Greenwich Mean Time) as the historic solar reference, UTC (Coordinated Universal Time) as the modern global standard, and time zones as 15° longitudinal slices that may be adjusted for administrative convenience.

Local time is described as the offset from UTC (e.g., UTC+8 for Beijing), and daylight‑saving time (DST) is introduced as a seasonal one‑hour shift intended to save energy, with examples of its implementation and termination.

Impact of DST and time‑zone changes on game systems is highlighted, noting that a day can be 23 or 25 hours, that many regions observe DST, and that conversion times are not fixed, requiring flexible handling in code.

Three common approaches for handling multiple time zones in games:

UTC+0 strategy : All server and client times use UTC+0; planners must calculate activity times for each region. Advantage: no conversion logic needed. Disadvantage: players and planners must manually compute local times.

Server‑time strategy : Server time follows the server’s local time zone; clients sync to server time. Advantage: consistent timing within a server region. Disadvantage: global events may start at different local times.

Client‑time strategy : Server sends UTC timestamps; client displays times according to the device’s time zone. Advantage: user‑friendly for travelers. Disadvantage: static date strings in UI can cause inconsistencies and allow time‑cheating.

Special considerations include differing date formats across cultures (MM/DD/YYYY vs DD/MM/YYYY vs YYYY/MM/DD) and the need to avoid hard‑coded times that fall within DST transition gaps.

Common bugs caused by time‑zone changes:

Players modifying system time to cheat daily tasks or bypass anti‑addiction limits.

Activities failing to start or reset correctly during DST transitions.

Server‑side time‑difference calculations breaking when a day is not 24 hours.

Examples of code for obtaining timestamps are provided and should be used to ensure consistent absolute moments across regions:

-- Lua
os.time()
# Linux
date +%s
# Python
time.time()

Testing methodology: Change system time and time zone, restart the game client, and verify that countdowns, historical records, announcements, and other time‑dependent features match the planned schedule without errors. Server‑side time changes alone are insufficient for DST testing; the OS clock must be adjusted.

The article concludes with a checklist for QA before branch merges, emphasizing dedicated time‑zone testing to prevent serious bugs, and encourages sharing experiences to improve the checklist further.

testinggame developmenttimestampDSTUTCTime zones
NetEase LeiHuo Testing Center
Written by

NetEase LeiHuo Testing Center

LeiHuo Testing Center provides high-quality, efficient QA services, striving to become a leading testing team in China.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.