時間/数値
Unix Timestamp ↔ 日付
Unix時間を日付に変換、またはその逆。任意のタイムゾーン(IANA)に対応。
Unix time (epoch time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It's the most common way to store time in databases, APIs, and logs, since it's just a single integer with no tie to a specific timezone or date format.
How to use it
- Timestamp → date: paste a number of seconds (or milliseconds) and the tool shows the date and time in your chosen timezone.
- Date → timestamp: pick a date and time to get the matching Unix timestamp.
- The "now" button fills in the current moment instantly — handy for testing an API or grabbing a fresh value.
Common uses
- Reading a created_at or expires_at field from an API response that arrived as a raw number.
- Checking whether a token or session has expired, given an expiry field in seconds since the epoch.
- Building a timestamp for test data or a date filter in a database query.
Things to keep in mind
Mixing up seconds and milliseconds is the most common mistake: JavaScript's Date.now() returns milliseconds, while most Unix APIs use seconds — a factor of 1000 off.
Unix time itself has no timezone — it's always UTC; a timezone is only applied when displaying the date to a person.
よくある質問
Unixタイムスタンプとは何ですか?
これは1970年1月1日00:00:00 UTC(Unixエポック)から経過した秒数です。この数値はどのタイムゾーンにも紐付けられていません — タイムゾーンは日付を人に表示するときにのみ適用されます。
秒とミリ秒の違いは何ですか?
JavaScriptや一部のAPI(Date.now()など)はミリ秒でタイムスタンプを返しますが、古典的なUnix時間は秒単位です。単位を間違えると、日付が1970年になるか、遠い未来のどこかになります — 「単位」フィールドで正しい単位を選んでください。
2038年問題とは何ですか?
タイムスタンプが符号付き32ビット整数として保存されるシステムでは、秒カウンターが2038年1月19日にオーバーフローします。現代の64ビットシステムにはこの問題はありません。
Unix時間はうるう秒を考慮しますか?
いいえ、Unix時間では1日は常にちょうど86400秒であり、うるう秒は無視されます。天文学的なUTCと正確に同期する必要があるシステムは、標準のUnixタイムスタンプとは別の仕組みでうるう秒を処理します。
Unixタイムスタンプは負の値になり得ますか?
はい、負の値は1970年1月1日より前の日付に対応します。ほとんどの現代のシステムはこうした値を正しく処理しますが、一部の古いAPIやライブラリでは対応していない場合があります。