0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

日本時間(JST)とUTCの関係

Posted at

基本情報

  • 日本時間(JST) = UTC + 9時間
  • UTC = 協定世界時(世界標準時)

つまり、日本時間はUTCより9時間進んでいます

UTC:  2024-01-01T00:00:00Z  (午前0時)
JST:  2024-01-01T09:00:00+09:00  (午前9時)

UTC:  2024-01-01T09:00:00Z  (午前9時)
JST:  2024-01-01T18:00:00+09:00  (午後6時)

ISO 8601形式の日時表記

記号の意味

記号 意味 説明
T 日付と時刻の区切り 2024-01-01T09:00:00
Z UTC(協定世界時) 2024-01-01T09:00:00Z
+09:00 UTC+9(日本時間) 2024-01-01T09:00:00+09:00

表記例

  • UTC(世界標準時): 2024-01-01T09:00:00Z
  • 日本時間(JST、UTC+9): 2024-01-01T09:00:00+09:00

時刻の変換

UTC → 日本時間(JST)

UTCに9時間を足す

UTC:  2024-01-01T00:00:00Z
JST:  2024-01-01T09:00:00+09:00  (UTC + 9時間)

UTC:  2024-01-01T15:00:00Z
JST:  2024-01-02T00:00:00+09:00  (UTC + 9時間、日付が変わる)

日本時間(JST)→ UTC

日本時間から9時間を引く

JST:  2024-01-01T09:00:00+09:00
UTC:  2024-01-01T00:00:00Z  (JST - 9時間)

JST:  2024-01-01T05:00:00+09:00
UTC:  2024-01-01T20:00:00Z (前日)  (JST - 9時間、日付が変わる)

まとめ

  • 日本時間(JST) = UTC + 9時間
  • T = 日付と時刻の区切り文字
  • Z = UTC(協定世界時)
  • +09:00 = UTC+9(日本時間)

変換の覚え方

UTC から JST:  +9時間
JST から UTC:  -9時間

よく使う表記

  • UTC(推奨:テストではUTCを使うことが多い): 2024-01-01T09:00:00Z
  • 日本時間(必要に応じて): 2024-01-01T09:00:00+09:00
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?