Unixタイムスタンプ変換器

日時をUnix秒・ミリ秒・ISO文字列に変換します。

// about

ツールについて

コンピュータは1970年1月1日からの経過時間を「秒」の数字で記録します。これがUnixタイムスタンプです。このツールは数字を人間が読める日付や時刻に相互変換します。

使い方

  1. タイムスタンプの数字または日時を入力します。
  2. 「変換」ボタンを押します。
  3. ローカル日時やUTC日時に変換された結果を確認します。

このツールが使われる理由

  • 1700000000のような大きな数字を即座に日時に変換します。
  • 秒単位(10桁)とミリ秒単位(13桁)の両方に対応しています。
  • サーバーログやシステムエラーの発生日時の確認に最適です。

よくある質問 (FAQ)

Unixタイムスタンプとは何ですか?

1970年1月1日0時0分0秒(UTC)からの経過秒数を表す数値です。

10桁と13桁の数字の違いは何ですか?

10桁は「秒」単位、13桁は「ミリ秒(1/1000秒)」単位を表します。

表示されるタイムゾーンはどこですか?

お使いの機器のローカル時間と世界標準時(UTC)の両方を表示します。

ガイド · 日付・時刻 · 4分で読めます

Unixタイムスタンプ徹底解説:秒とミリ秒、タイムゾーン、2038年問題

1700000000 はいつなのか。なぜ13桁の数字を使うシステムがあるのか。なぜ時刻がちょうど9時間ずれるのか。いくつかの概念を押さえれば、時刻にまつわるバグの多くは消えます。

Unixタイムスタンプ(Unix時間、エポック秒)は、1970年1月1日 00:00:00 UTC、つまりUnixエポックからの経過秒数を数えた1つの整数です。0 は 1970-01-01 00:00:00 UTC、1700000000 は 2023-11-14 22:13:20 UTC です。

0           → 1970-01-01 00:00:00 UTC
1700000000  → 2023-11-14 22:13:20 UTC
1735689600  → 2025-01-01 00:00:00 UTC
2147483647  → 2038-01-19 03:14:07 UTC
Unixタイムスタンプとは何か、10桁と13桁の見分け方、UTCと現地時刻の変換、夏時間の落とし穴、2038年問題までを解説します。
ガイドを読む →
AIで作る

このツールをAIで自作してみましょう

自分用のバージョンが必要なら、作業指示プロンプトをAIチャットに貼り付けるか、スキルファイルをAIコーディングエージェントに保存してください。私たちが開発時に整理した機能、例外、テストケースが含まれています。

プロンプトとスキルは英語で提供しています。AIツールはどの言語でもよく理解できます。

AI作業指示プロンプト

Claude、ChatGPT、GeminiなどのAIチャットにそのまま貼り付けてください。

You are an experienced full-stack web developer. Build a web tool called "Unixタイムスタンプ変換器" that meets the requirements below.

## Goal

Build a tool that converts between Unix timestamps and human-readable dates.

## Core features

- Timestamp → date and date → timestamp
- Auto-detect seconds (10 digits) or milliseconds (13 digits)
- Show UTC, local and a chosen IANA zone together
- ISO 8601 output
- 'Now' button

## Inputs

- A timestamp or a date and time
- Time zone

## Outputs

- Converted date or timestamp
- ISO 8601 string
- Relative time (e.g. 3 days ago)

## Edge cases and handling rules

- Support negative timestamps before 1970
- Handle values after 2038 correctly
- Explain skipped or repeated local times at DST transitions
- Validate non-numeric input

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- 0 → 1970-01-01T00:00:00Z
- 1700000000 → 2023-11-14T22:13:20Z
- 1700000000000 (13 digits) is the same instant

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

スキル (SKILL.md)

Claude CodeなどのAIコーディングエージェントで .claude/skills/build-timestamp-converter/SKILL.md に保存すると、このツールを作る・直すたびに再利用できます。

---
name: build-timestamp-converter
description: Use when building or changing a Unixタイムスタンプ変換器 tool. Build a tool that converts between Unix timestamps and human-readable dates.
---

# Build: Unixタイムスタンプ変換器

## Goal

Build a tool that converts between Unix timestamps and human-readable dates.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Timestamp → date and date → timestamp
- Auto-detect seconds (10 digits) or milliseconds (13 digits)
- Show UTC, local and a chosen IANA zone together
- ISO 8601 output
- 'Now' button

## Inputs

- A timestamp or a date and time
- Time zone

## Outputs

- Converted date or timestamp
- ISO 8601 string
- Relative time (e.g. 3 days ago)

## Rules

- Support negative timestamps before 1970
- Handle values after 2038 correctly
- Explain skipped or repeated local times at DST transitions
- Validate non-numeric input
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] 0 → 1970-01-01T00:00:00Z
- [ ] 1700000000 → 2023-11-14T22:13:20Z
- [ ] 1700000000000 (13 digits) is the same instant

AIに任せるときのコツ

  • 最初の行に使用技術(React、Vue、素のHTMLなど)を書くと、プロジェクトに合ったコードになります。
  • コードを受け取る前に、テストケースを実行して結果を見せるよう依頼しましょう。
  • 本物のパスワード、顧客データ、APIキーは入力せず、サンプル値を使ってください。