レッスン 3

UTC, Local Time, and Timezones 日本語ガイド

日本語の timestamp utc local and timezones ガイド: Wall clock vs instant, IANA zones, and daylight saving shifts.

このコンテンツはまだ日本語で用意されていません。ローカライズが完了するまで English 版を表示しています。

A Unix timestamp identifies an instant—one point on the global timeline. UTC and local time are different ways to label that instant for humans.

UTC

Coordinated Universal Time (UTC) is the reference timescale without seasonal offsets. When logs say “all times in UTC,” comparisons across regions do not require guessing local rules.

ISO strings ending in Z mean “Zulu” = UTC, e.g. 2024-01-15T08:30:00Z.

Local wall time

Your laptop clock shows local wall time—the civil time in your timezone, including daylight saving adjustments. Two developers looking at the same timestamp may write different clock readings:

  • 2024-07-01 09:00 in Europe/Berlin
  • 2024-07-01 15:00 in Asia/Shanghai

Both can describe the same instant.

IANA timezone names

Systems use names like America/New_York or Asia/Tokyo (IANA Time Zone Database). These names encode historical offset changes—prefer them over fixed “UTC+8” labels when scheduling future events across DST boundaries.

Offset alone is not a timezone. UTC+8 on a given day may not tell you what happens when DST rules differ by country.

Storage vs display

Best practice in backends:

  • Store UTC instant (timestamp or TIMESTAMPTZ)
  • Convert to local timezone only in UI or user-specific reports

Key takeaway

Timestamps store when; timezones decide how you read the clock. Always know which layer you are looking at.

実践したいときは関連する DevCove ツールを使えます。任意であり、このレッスンの必須部分ではありません。

関連ツールを開く

コース概要へ戻る