Pick date:
A Unix timestamp (also called Unix time or POSIX time) is the number of seconds since 1970-01-01 00:00:00 UTC.
It is a convenient way to store and compare time values across systems. Most systems treat it as a continuous count of seconds and do not count leap seconds.
Some 32-bit systems overflow in 2038 (the Year 2038 problem).
Get current epoch time and convert an epoch timestamp to a human-readable date (replace 1800000000.
// now (seconds) Math.floor(Date.now() / 1000) // epoch -> date new Date(1800000000 * 1000).toISOString()
import time # now (seconds) int(time.time()) # epoch -> date (local) time.ctime(1800000000)
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println(time.Now().Unix())
fmt.Println(time.Unix(1800000000, 0).UTC())
}-- now (seconds) SELECT EXTRACT(EPOCH FROM now()); -- epoch -> timestamp SELECT TO_TIMESTAMP(1800000000);
date +%s date -d @1800000000
date +%s date -j -r 1800000000