Epoch & Timestamp Converter

Convert timestamp to date format or get timestamp of specified date.

Unix epoch timestamp
Date & Time

Date & Time

The programming language to get the timestamp value:

Math.round(new Date() / 1000)
Document
import time;
time.time()
Document
(int) (System.currentTimeMillis() / 1000)
Document
import ( "time" )
int32(time.Now().Unix())
Document
double now_time = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count();
Document
NSDate().timeIntervalSince1970
Document
SELECT UNIX_TIMESTAMP(); #1567758868
SELECT FROM_UNIXTIME(1567758868); #2019-9-6 16:34:28
time()
Document
DateTimeOffset.Now.ToUnixTimeSeconds()
Document
Time.now.to_i
Document

Standard definition of date and time specifications

RFC 822 | RFC 1036 | RFC 1123 | RFC 2822 | RFC 3339 | RFC 5322 | ISO 8601

What is epoch timestamp?

UNIX time, or POSIX time, is the time representation used by UNIX or UNIX-like systems: the total number of seconds from 0:0:0:0 on January 1, 1970 UTC to the present, regardless of leap seconds.

Year 2038 problem

The earliest versions of Unix time were 32-bit integers increasing at 60 Hz. The first edition of the Unix Programmer's Manual, released on November 3, 1971, defined Unix time as "the time since 00:00:00, 1 January 1971, measured in sixtieths of a second", i.e. starting at 00:00:00, 1 January 1971, and increasing by 60 Hz. This means that storing Unix time as a 32-bit unsigned integer will run out of resets after 829 days (about 2.5 years). Because of this limitation, the Unix time origin was redefined several times until it began to use the time origin of January 1, 1970 at 00:00:00 UTC, timed at 1 Hz. Since Unix and C use 32-bit signed integers to represent time, this accommodates a time span of about 136 years, split 50/50 between before and after 1970. That is, until January 19, 2038 when the reset is exhausted.

Most systems using UNIX today are 32-bit, that is, they represent the time type time_t as a 32-bit signed integer. So it can represent seconds in 136 years. Represents Fri Dec 13, 1901 20:45:52 UTC to Jan 19, 2038 3:14:07 UTC (binary: 01111111 11111111 11111111 11111111, 0x7FFF:FFFF), in the next second the binary number will be 10000000 00000000 00000000 00000000 (0x8000:0000), this is a negative number, so systems will misinterpret the time as December 13, 1901, 20:45:52 (and possibly back to 1970). At this time, software problems may occur, resulting in system paralysis.

The current solution is to convert the system from a 32-bit to a 64-bit system. Under a 64-bit system, this time can be represented up to 292.2777702659 trillion 15:30:08 on December 4th.

File size exceeds limit.

You can not upload any more files.

Upgrade your account to unlock more

Monthly Billing
Yearly Billing
-40%

Premium

US$ / Month
One-time payment of US$36

Unlimited

US$ / Month
One-time payment of US$72