Convert a Unix Timestamp to a UTC date.
A Unix timestamp or Unix epoch is the time in seconds from The Unix Epoch.The Unix Epoch was on 1970-01-01 00:00:00 UTC.
The Now epoch ≈
1742998729.
!epoch converts to UTC dates
Common Unix epochs in seconds,
Unix epochs in milliseconds,
and negative Unix epochs.
Examples:
!epoch 0!epoch 1333333333!epoch 12345678901!epoch -24681012!epoch 9999999999ms!epoch 1010101010!epoch -8888 ms!epoch 10101010101!epoch -2000!epoch 1234567890!epoch -1234567890!epoch -74711160000!epoch -9876543210 ms!epoch +1337!epoch takes inputs in [
-999999999999999,
999999999999999]
The resulted UTC date may be some milliseconds or seconds off from the actual UTC date. Unix time does not account leap seconds and all days are 86400 seconds long. UTC time does account leap seconds.
The leap seconds are guesstimated with the following equation
The guesstimated leap seconds are not added to the offset seconds. The guesstimated leap seconds are not used in the Unix epoch to UTC date conversion.
The !epoch large range is artistic. The leap seconds calculation is wrong. It assumes a constant rate at which 27 leap seconds are added every 53 years and one leap second is removed every 55 years. Note that Unix time keeping was invented around 1970, that the leap seconds were first used around 1972, that there is not known formula for predicting the earth's speed of rotation with very high accuracy, and that we have recordings of high precision earth year duration measurements only after the invention of the cesium atomic clock.