What's Unix Timetamp?
Unix Timestamp, also known as Epoch Time or POSIX Time, refers to UTC time from the time of world reconciliation 01/01/1970 at 0000 hours and 0 seconds The total number of seconds from now on. It does not take swirl into account and is a common standard for recording time in computer systems.
Why use the time stamp?
- Format harmonization: Time stamp at the same time is the only number in any language or time zone.
- Computation convenience: The interval between two points is calculated by simple subtraction.
- Storage savings: A 64-bit integer is smaller and more efficient in indexing than a formatted string.
On the year 2038 (Y2K38)
The maximum time to express is in a system using 32 bits of symbol integer storage time stamp 2147483647 , this corresponds to UTC time 19 January 2038 at 03:14:07 。 Beyond this moment, the value will spill into negative numbers, leading to a rollback of system time to 1901. Modern 64 The problem has been resolved by the bit system, which can record a time span well beyond the lifetime of the universe.
Common programming language to get current timetamps
- JavaScript: Math.floor(Date.now() / 1000)
- Python: import time; int(time.time())
- PHP: time()
- Java: System.currentTimeMillis() / 1000L
- MySQL: SELECT UNIX_TIMESTAMP(NOW())
How to use this tool?
- View in real time: The top bar shows the current UNIX time stamp in real time, which allows you to quickly access the current value when debugging.
- Time stamp date: Enter a series of numbers, select units (sec or ms), click conversion to get the local time zone and UTC corresponding to that time point Detailed dates for the time zone.
- Date to time stamp: Use the date selector to set a specific time point, and click on the conversion to get its corresponding seconds and milliseconds time stamp.