Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and vice versa. Get the current Unix timestamp with real-time updates.

Current Unix Timestamp

0
Seconds since Jan 01 1970 (UTC)
Current time

Convert Timestamp to Date

Convert Date to Timestamp

Current Epoch Information

Date:
UTC:
ISO 8601:
RFC 822:
RFC 2822:
RFC 3339:

What is the Unix timestamp?

The Unix timestamp (also known as Unix time, POSIX time, or epoch time) is a system for describing points in time: the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC (Coordinated Universal Time). This date is known as the Unix epoch.

Unix timestamps are widely used in programming and computing because they provide a simple, universal way to represent time that is independent of time zones and calendar systems. They are stored as integers, making them easy to work with in databases and programming languages.

Why should I use a Unix timestamp?

Unix timestamps offer several advantages for developers and system administrators:

  • Universal Standard: Works across all time zones and doesn't require time zone conversion
  • Simplicity: Stored as a single integer value, making calculations and comparisons easy
  • Efficiency: Takes up minimal storage space compared to formatted date strings
  • Sorting: Natural chronological ordering when sorted numerically
  • Database-friendly: Most databases have built-in functions to work with Unix timestamps
  • API Integration: Many APIs use Unix timestamps for date/time data exchange

What happens on January 19, 2038?

January 19, 2038, at 03:14:07 UTC marks the "Year 2038 problem" or "Y2038 bug." This is when 32-bit signed integer Unix timestamps will overflow, rolling over from 2,147,483,647 to -2,147,483,648, which would be interpreted as December 13, 1901.

This issue affects systems that use 32-bit integers to store Unix timestamps. However, most modern systems have already migrated to 64-bit timestamps, which won't have this problem for approximately 292 billion years. The transition to 64-bit systems and updated software has largely mitigated this concern for contemporary applications.

How to get Unix timestamp in programming languages

Get current Unix timestamp:

JavaScript: Math.floor(Date.now() / 1000)
PHP: time()
Python: int(time.time())
Ruby: Time.now.to_i
Java: System.currentTimeMillis() / 1000
C#: DateTimeOffset.UtcNow.ToUnixTimeSeconds()
Go: time.Now().Unix()
Bash: date +%s
MySQL: SELECT UNIX_TIMESTAMP()
PostgreSQL: SELECT EXTRACT(EPOCH FROM NOW())

Convert Unix timestamp to human-readable date:

JavaScript: new Date(timestamp * 1000).toString()
PHP: date('Y-m-d H:i:s', $timestamp)
Python: datetime.fromtimestamp(timestamp)
Ruby: Time.at(timestamp)
Java: new Date(timestamp * 1000)
C#: DateTimeOffset.FromUnixTimeSeconds(timestamp)
Go: time.Unix(timestamp, 0)
Bash: date -d @timestamp
MySQL: FROM_UNIXTIME(timestamp)
PostgreSQL: TO_TIMESTAMP(timestamp)