Unix Timestamp
unix-timestamp
The number of seconds that have elapsed since January 1, 1970 00:00:00 UTC, widely used in computing to represent points in time.
timestamp
A timestamp is a piece of data that records the precise moment an event occurred. Timestamps appear everywhere: log file entries, database record creation times, file modification dates, and financial trade execution times all rely on timestamps to answer the question "when did this happen?" Common representations include Unix timestamps (integers), ISO 8601 strings, and database-native datetime types.
Unix timestamp: the number of seconds elapsed since 1970-01-01T00:00:00Z (e.g., 1747310400). Compact and easy to compute with. ISO 8601 string: human-readable and unambiguous (e.g., 2026-05-15T16:00:00+09:00). RFC 2822: used in email headers (e.g., Fri, 15 May 2026 16:00:00 +0900). Database types: PostgreSQL's TIMESTAMPTZ, MySQL's DATETIME, and similar native date-time columns.
Timestamps should always include timezone information. A bare timestamp without a timezone (e.g., 2026-05-15 16:00:00) is ambiguous and a common source of bugs. The standard design pattern is to store all timestamps in UTC and convert to the user's local time only at display time. Precision (seconds, milliseconds, or microseconds) should be consistent across the entire system to avoid subtle comparison errors.
Was this article helpful?
unix-timestamp
The number of seconds that have elapsed since January 1, 1970 00:00:00 UTC, widely used in computing to represent points in time.
iso-8601
An international standard for representing dates and times in an unambiguous, machine-readable format.
epoch
A fixed reference point in time from which a system measures elapsed time, most commonly January 1, 1970 for Unix systems.
Learn what Unix timestamps are, why they count seconds from January 1, 1970, how to convert them to human-readable dates, and what the Year 2038 problem means.
MySQL timezone bugs almost always trace back to a misunderstanding of three layers: server defaults, session settings, and column types. This article explains why TIMESTAMP and DATETIME behave differently, how the time_zone variable interacts with connections, and how to configure JDBC drivers correctly.
Choosing between DATE, TIME, TIMESTAMP, and TIMESTAMPTZ shapes whether your application handles time zones correctly. This article walks through reservation systems, future event scheduling, audit trails, and migration strategy for legacy schemas that ignored time zones.