Unix Timestamp Converter
Unix Timestamp Converter is evaluated from Unix Timestamp. The calculation reports UTC Date & Time, Local Date and Days Since Unix Epoch.
Results
About the Unix Timestamp Converter
The calculator uses a multi formula configuration. Each reported value is read as a direct evaluation of the stored rules with the declared field formats and units.
Formula basis:
_ts = parseInt(unix_timestamp)
_d = new Date(_ts * 1000)
utc_date = _d.toUTCString()
local_date = _d.toString()
days_since = _ts / 86400
years_since = _ts / 31556952
hex_timestamp = '0x' + _ts.toString(16).toUpperCase()
Interpret the outputs in the order shown by the result fields. Optional inputs affect only the outputs that depend on those variables.
Formula & How It Works
The calculation applies the following relations exactly as recorded in the metadata: _ts = parseInt(unix_timestamp) _d = new Date(_ts * 1000) utc_date = _d.toUTCString() local_date = _d.toString() days_since = _ts / 86400 years_since = _ts / 31556952 hex_timestamp = '0x' + _ts.toString(16).toUpperCase() Each output field is produced by substituting the supplied inputs into the relevant relation and then applying the declared rounding or text format.
Worked Examples
Example 1: Current timestamp approx: 1,700,000,000 (Nov 2023)
Inputs
With Unix Timestamp = 1,700,000,000 as the stated inputs, the result is UTC Date & Time = Tue, 14 Nov 2023 22:13:20 GMT, Local Date = Tue Nov 14 2023 22:13:20 and Days Since Unix Epoch = 19,675.9259 days. Each value corresponds to the declared output fields.
Example 2: Moon landing: Neil Armstrong steps out — approx Unix time
Inputs
With Unix Timestamp = -14,187,240 as the stated inputs, the result is UTC Date & Time = Sun, 20 Jul 1969 19:06:00 GMT, Local Date = Sun Jul 20 1969 19:06:00 and Days Since Unix Epoch = -164.2042 days. Each value corresponds to the declared output fields.
Example 3: Y2K38 problem: 2,147,483,647 (max 32-bit)
Inputs
With Unix Timestamp = 2,147,483,647 as the stated inputs, the result is UTC Date & Time = Tue, 19 Jan 2038 03:14:07 GMT, Local Date = Tue Jan 19 2038 03:14:07 and Days Since Unix Epoch = 24,855.1348 days. Each value corresponds to the declared output fields.
Example 4: Birth year 1990: estimate (Jan 1, 1990 midnight UTC)
Inputs
With Unix Timestamp = 631,152,000 as the stated inputs, the result is UTC Date & Time = Mon, 01 Jan 1990 00:00:00 GMT, Local Date = Mon Jan 01 1990 00:00:00 and Days Since Unix Epoch = 7,305 days. Each value corresponds to the declared output fields.
Common Use Cases
- Convert Unix timestamp to readable date
- Find the epoch time for a given date
- Calculate time difference between two Unix timestamps