TIME DOCUMENTATION
Timestamp documentation
Browse timestamp conversion guides, date formats and practical advice for each programming environment.
Practical guides to Unix timestamps, date formats and time zones, with examples for each programming environment.
Guides by language and format
Python timestamps
Convert Unix seconds to a UTC date and back to a timestamp without time zone ambiguity.
02 / GUIDEJavaScript timestamps
Date uses milliseconds. Learn how to convert, format and validate timestamps.
03 / GUIDEPHP timestamps
Use DateTimeImmutable to convert and display a timestamp without changing the original date.
04 / GUIDESQL timestamps
PostgreSQL, MySQL and SQLite use different functions. Make the time zone explicit.
05 / GUIDEThe Year 2038 problem
Understand the limit of a Unix timestamp stored in a signed 32-bit integer.
06 / GUIDEConvert a timestamp in six languages
Short examples that convert the same instant to UTC.
07 / GUIDEJava timestamps with Instant
Convert, compare and calculate durations with the java.time API.
08 / GUIDEWorking with timestamps in C
Read the clock, display a UTC date and calculate an interval in a POSIX environment.
09 / GUIDEApple timestamps: Unix and the reference date
Distinguish seconds since 1970 from seconds since the Foundation reference date in 2001.
10 / GUIDEPostgreSQL timestamps and time zones
Choose timestamp or timestamptz and convert Unix seconds without confusion.
11 / GUIDEMySQL timestamps: conversion and storage
Use FROM_UNIXTIME and UNIX_TIMESTAMP with an explicit UTC convention.
12 / GUIDEMariaDB timestamps
Convert a Unix value and check the behavior of your MariaDB version.
13 / GUIDEUnderstanding Unix timestamps and the Epoch
Origin, units, conversion and comparison: the basics of handling an instant correctly.
14 / GUIDEUnderstanding ISO 8601
A common notation for exchanging dates and times, provided their context is explicit.
15 / GUIDEGo timestamps: Unix, UnixMilli and formatting
Convert a timestamp to time.Time, format a date and handle UTC with the Go time package.
16 / GUIDERust timestamps: SystemTime, Chrono and time
Read Unix time in Rust, convert seconds or milliseconds and format RFC 3339 dates.
17 / GUIDENestJS timestamps: API validation and conversion
Validate timestamps received by a NestJS API, specify their unit and return a UTC date without losing precision.