Ana içeriğe geç
FreeOnlineTools Go
Türkçe
how-to

Unix Zaman Damgalarını Okunabilir Tarihleri Dönüştürme

By FreeOnlineTools Team · Updated 2026-08-28

Quick Answer

Unix timestamp = 1970-01-01 00:00:00 UTC'den bu yana saniye (veya milisaniye). JavaScript'te new Date(timestamp * 1000) (saniye) veya new Date(timestamp) (milisaniye) ile tarihe dönüştürün. Her ikisini de anında yapmak için Timestamp Converter kullanın.

Introduction

Unix timestamp (epoch time veya POSIX time da denir), 1970-01-01 00:00:00 UTC'den (Unix epoch) bu yana geçen saniye sayısıdır, leap second hariç. Computing'de zamanın lingua franca'sıdır çünkü timezone-bağımsız ve trivial olarak sıralanabilen tek bir integer'dır. Çoğu sistem saniye kullanır; JavaScript ve birçok veritabanı milisaniye kullanır.

Step by Step

  1. Understand seconds vs milliseconds

    Most backend systems and APIs use seconds (10-digit timestamps until 2286). JavaScript's Date and Java's Instant use milliseconds (13-digit). Always confirm which unit an API expects —mixing them shifts the date by a factor of 1000 (off by ~31 years).

  2. Convert a timestamp to a readable date

    Paste the timestamp into the Timestamp Converter. It detects seconds vs milliseconds by length (10 vs 13 digits) and displays the date in UTC and your local timezone. In code: new Date(1700000000 * 1000).toISOString() returns '2023-11-14T22:13:20.000Z'.

  3. Convert a date to a timestamp

    Enter a date and time into the converter; it returns the Unix timestamp. In code: Math.floor(new Date('2026-08-28T12:00:00Z').getTime() / 1000) returns the epoch seconds. Always specify the timezone (Z or an offset) to avoid local-time ambiguity.

  4. Handle time zones correctly

    Unix timestamps are always UTC —they have no timezone. Convert to a local display only at the presentation layer. Never store local time as a timestamp; store UTC and convert on display. Use IANA timezone names (America/New_York) with Intl.DateTimeFormat for correct DST handling.

  5. Calculate differences between dates

    Subtract two timestamps to get the difference in seconds (or milliseconds). Divide by 60 for minutes, 3600 for hours, 86400 for days. Use our Date Difference tool for human-friendly ranges, or the Age Calculator for birth-date-based ages.

Examples

The Unix epoch

Input: 0 (seconds)

Output: 1970-01-01 00:00:00 UTC

One billion seconds after the epoch

Input: 1000000000 (seconds)

Output: 2001-09-09 01:46:40 UTC

Start of 2026 in UTC

Input: 2026-01-01T00:00:00Z

Output: 1767225600 (seconds) / 1767225600000 (milliseconds)

Difference between two dates

Input: 1767225600 - 1700000000

Output: 67225600 seconds = 778.08 days ≥2 years 31 days

Common Problems

  • Seconds vs milliseconds confusion: a 10-digit timestamp read as milliseconds gives a date in 1970; a 13-digit timestamp read as seconds overflows 32-bit int. Detect the unit by digit count or document it explicitly in the API.
  • Storing local time as a timestamp: timestamps are UTC. If you compute Date.now() in a browser set to UTC-5 and treat the result as local, DST transitions will shift your data by an hour twice a year.
  • 32-bit overflow on 2038-01-19 03:14:07 UTC (Y2038): systems using a signed 32-bit seconds timestamp cannot represent dates after this point. Use 64-bit or millisecond timestamps in new systems.
  • Leap seconds are ignored: Unix timestamps skip leap seconds, so the difference between two timestamps does not equal the number of SI seconds that elapsed. Most applications can ignore this; high-precision astronomy and finance cannot.

Tips

  • Always store and transmit timestamps in UTC; convert to local time only at the display layer using Intl.DateTimeFormat with an IANA timezone.
  • Use ISO 8601 strings (e.g. 2026-08-28T12:00:00Z) for human-readable APIs and timestamps for storage —ISO strings carry their timezone explicitly and are unambiguous.
  • When comparing timestamps, use the same unit (seconds or milliseconds) on both sides —a unit mismatch is one of the most common date bugs.
  • Use our Timestamp Converter to sanity-check API responses during debugging —it shows both UTC and local time so you can spot timezone bugs immediately.

Related Tools

Related Guides

References