Fact-checked by Grok 2 weeks ago

Unix time

Unix time, also known as time or epoch time, is a standard for representing instants in time as the number of seconds elapsed since the Unix —00:00:00 UTC on 1 January 1970—excluding leap seconds. This convention originated in early Unix operating systems and forms the basis for time representation in -compliant environments, where it is typically stored as a signed integer of type time_t. The time() function in the returns the current Unix time as this value, enabling efficient arithmetic operations for date and time calculations across computing systems. Widely adopted beyond Unix-like systems, Unix time underpins timestamping in file systems, databases, network protocols, and programming languages, including JavaScript's Date object (which uses milliseconds since the epoch) and HTTP headers for caching and expiration. Its simplicity facilitates interoperability but introduces challenges: it ignores leap seconds, treating every day as exactly 86,400 seconds, which can cause discrepancies of up to 27 seconds (the total of 27 leap seconds added since 1970, as of November 2025) when converting to or from UTC. Additionally, on systems using a 32-bit signed time_t, the maximum value of 2,147,483,647 seconds is reached at 03:14:07 UTC on 19 January 2038, triggering the —potential overflows leading to incorrect time representations or system failures. To address these limitations, modern POSIX implementations increasingly use 64-bit time_t for extended range (up to year 292 billion), and extensions like struct timespec provide nanosecond precision via tv_sec (seconds since ) and tv_nsec (s). Despite ongoing transitions, Unix time remains a foundational element in due to its portability and efficiency.

Fundamentals

Definition

Unix time, also known as time, is a system for representing points in time as the number of seconds that have elapsed since the Unix , excluding leap seconds in standard implementations. It serves as a linear count of non-leap seconds, providing a simple, machine-readable that aligns with (UTC). This treats time as a , extending the rules backward indefinitely from the starting at 1970-01-01 00:00:00 UTC. The proleptic extension assumes the same rules apply before the historical introduction of the in 1582. In standard POSIX-compliant systems, Unix time is typically stored using the signed integer type time_t, which allows of dates both before (negative values) and after the (positive values). Some non-standard implementations may use unsigned integers, limiting to post- times only. The value is computed as Unix time = floor((current UTC time - ) / 1 second).

Epoch

The Unix epoch serves as the zero point for Unix time, defined as 00:00:00 UTC on , , 1970. This specific date marks the beginning of the decade and was selected as a convenient reference point close to the period of Unix's initial development in the late and early 1970s, adjusted to center the representable time range for early 32-bit implementations. Unix time extends proleptically to dates before the , where timestamps become negative integers representing seconds elapsed prior to 1970-01-01 00:00:00 UTC. These negative values follow the , which applies Gregorian rules backward indefinitely, enabling consistent date representations for historical periods. In date calculations, Unix timestamps inherently denote UTC, requiring conversion to local time by applying the appropriate time zone offset. These offsets account for variations due to daylight saving time, which implementations like the POSIX mktime() function determine based on local rules to yield accurate local timestamps. Proper handling of historical DST changes is essential to avoid discrepancies in pre-epoch or transitional periods.

Numeric Representation

Unix time is conventionally encoded as a signed value representing the number of whole seconds that have elapsed since the Unix of 1970-01-01 00:00:00 UTC. In the standard, this value is stored in the time_t data type, an arithmetic type suitable for representing calendar time as seconds since the . Historical implementations typically employed a 32-bit signed for time_t, limiting the representable range to a maximum of $2^{31} - 1 = [2147483647](/page/2,147,483,647) seconds after the , which equates to 03:14:07 UTC on 19 January 2038. To arrive at this date, divide the maximum seconds by (seconds per day) to get approximately 24,855.02 days, then add this duration to the date, accounting for rules (including leap years), yielding 19 January 2038 at the specified time. Contemporary systems often use a 64-bit signed for time_t, expanding the maximum value to $2^{63} - 1 = 9223372036854775807 seconds, or roughly 292 billion years into the future (calculated as (2^{63} - 1) / (365.25 \times [86{,}400](/page/86_400)) \approx 292{,}277{,}026{,}596 years). The conversion between Unix time and a human-readable follows a straightforward additive : the t is the integer seconds since the , so the corresponding UTC datetime is the plus t seconds. This can be expressed as: \text{UTC datetime} = 1970{-}01{-}01~00:00:00~\text{UTC} + t~\text{seconds} where t is the Unix . Libraries and functions in programming languages implement this by adjusting for irregularities, such as leap days, but exclude leap seconds in the count. For greater precision beyond whole seconds, Unix time APIs often incorporate fractional components through auxiliary fields. For instance, the gettimeofday function returns time in a struct timeval, comprising tv_sec (the time_t seconds) and tv_usec (microseconds, ranging from 0 to 999,999). This allows sub-second resolution up to 1 . Similar structures exist in other APIs, such as nanosecond precision in struct timespec used by clock_gettime. When storing Unix timestamps in binary formats, such as files or packets, —the byte order of multi-byte integers—plays a critical role in ensuring across heterogeneous systems. Unix systems may be big-endian (most significant byte first, common in protocols) or little-endian (least significant byte first, typical in x86 architectures), so explicit to a standard order, like byte order, is recommended for portable storage.

Timekeeping Basis

UTC Alignment

Unix time is based on (UTC), representing the number of seconds elapsed since the epoch of 1970-01-01 00:00:00 UTC. This alignment ensures that Unix timestamps correspond to specific instants in the UTC timescale, providing a standardized reference for global timekeeping in computing systems. UTC serves as the international time standard, coordinated by the International Bureau of Weights and Measures (BIPM) and derived from (), which is a continuous scale based on atomic clocks realizing the SI second. Leap seconds are periodically inserted into UTC—based on recommendations from the International Earth Rotation and Reference Systems Service (IERS)—to maintain its proximity to , with the difference between UTC and currently at 37 seconds as of 2025. In contrast to UTC's adjustments, Unix time ignores leap seconds entirely, advancing at a constant rate of one second per SI second and treating each day as precisely 86,400 seconds. This omission, as required by POSIX standards, results in Unix time gradually diverging from UTC by the cumulative number of leap seconds introduced since the epoch, but it preserves a strictly monotonic count. The monotonic nature of Unix time makes it ideal for measuring durations and elapsed intervals, where subtracting two timestamps yields the exact number of seconds passed, unaffected by UTC's irregularities. Conversion between Unix time and UTC-readable formats, such as , typically involves system library functions that interpret the timestamp relative to the and generate a formatted string in UTC. For instance, the gmtime() function breaks down a time_t value into year, month, day, hour, minute, and second components assuming continuous counting from the , which can then be rendered in notation (e.g., "2025-11-08T12:00:00Z") while distributing the effect of ignored leap seconds across the calendar representation. This process ensures compatibility for protocols and applications requiring both compact numeric storage and standardized textual output.

Leap Seconds

Leap seconds are one-second adjustments occasionally inserted into (UTC) to compensate for variations in rate, which causes the length of the solar day to differ slightly from the uniform SI second defined by atomic clocks. These adjustments are introduced irregularly, typically at the end of or December, to keep UTC within 0.9 seconds of UT1, the scale based on . Since the practice began in 1972, 27 leap seconds have been added to UTC. Standard Unix time, also known as time, excludes these leap seconds from its measurement, counting only non-leap SI seconds since the of , 1970, 00:00:00 UTC and treating every day as precisely 86,400 seconds long. As a result, Unix time gradually diverges from UTC—and thus from —by the total number of leap seconds inserted since the , leading to a current offset of 27 seconds where Unix time lags behind UTC as of 2025. To mitigate issues arising from this exclusion, several variants address leap second handling in Unix time systems. TAI-based approaches rely on International Atomic Time (), a continuous scale without leap seconds that counts uniform SI seconds from the same atomic reference; TAI currently leads UTC by 37 seconds due to the initial 10-second offset at the start of UTC plus the 27 accumulated leaps. POSIX-compliant systems incorporate adjustments by using leap second tables to correct timestamps when converting to or from UTC, ensuring applications can account for the discrepancies without altering the core Unix count. In Network Time Protocol (NTP) implementations, the non-synchronous variant applies leap second smearing to distribute the adjustment evenly over a prolonged interval, such as 17 hours, preventing sudden clock jumps that could disrupt time-sensitive operations; this method, originally proposed for large-scale systems, is now part of NTP best current practices to maintain smooth synchronization. The leap-counting variant, in contrast, explicitly tracks and adds each leap second to the Unix timestamp during synchronization or conversion processes, allowing precise alignment with UTC by maintaining a running total of accumulated leaps from authoritative sources like IERS Bulletins. As of 2025, with 27 leap seconds accumulated and international agreements set to abolish further insertions by 2035, the 37-second offset between TAI and UTC will stabilize, though Unix time's 27-second drift from UTC will persist without ongoing corrections.

Historical Development

Origins in Unix

Unix time originated in the early development of the Unix operating system at in the early 1970s. It was defined in the first edition of the Unix Programmer's Manual from November 1971 as a 32-bit quantity representing sixtieths of a second since January 1, 1971, 00:00:00 UTC, reflecting the hardware's clock tick rate and the need for sub-second precision in early implementations on the PDP-11 . This representation was designed to efficiently track temporal data within the constraints of the PDP-11's 16-bit architecture, utilizing a 32-bit to store time values, which aligned with the machine's word size for two consecutive 16-bit registers. Initially, Unix time was employed for critical system functions, including recording file modification times in the inode structure and supporting process scheduling by providing a uniform measure of elapsed time. This granular unit allowed for accurate timestamping but limited the range to approximately 2.5 years due to the 32-bit constraint. To prevent overflows, the epoch was adjusted multiple times during the 1969–1973 period, including a brief use of January 1, 1972, as the starting point, with existing files back-dated to align. By the mid-1970s, the representation had evolved to seconds since the of January 1, 1970, 00:00:00 UTC, extending the usable range. This adjustment provided a symmetrical timeline of about 68 years from the PDP-11's perspective with a 32-bit signed . The manual from 1979 formally documents this standardized form, where the time(2) returns the current time as the number of seconds elapsed since the 1970 .

Standardization

The formal standardization of Unix time began with its inclusion in the IEEE Std 1003.1-1988, also known as POSIX.1, which established it as the basis for time representation in portable operating systems. This standard defined key functions such as time(), which returns the current time as the number of seconds since the Unix epoch (January 1, 1970, 00:00:00 UTC), and utime(), which sets file access and modification times using this representation. POSIX.1 ensured portability across systems by specifying that implementations must support this integer-based counting of non-leap seconds, excluding leap seconds from the count. Subsequent revisions of IEEE Std 1003.1 extended Unix time capabilities to address growing needs for precision and range. For instance, POSIX.1-2001 introduced clock_gettime() and the timespec structure, enabling sub-second precision down to nanoseconds while maintaining compatibility with the traditional time_t type. Regarding range limitations, POSIX.1-2008 raised awareness of the , where 32-bit signed time_t implementations would overflow after 2,147,483,647 seconds (corresponding to 2038-01-19 03:14:07 UTC), though it did not mandate a 64-bit transition; many systems adopted 64-bit time_t voluntarily to extend the range to 292 billion years. The ISO/IEC 9899 standard for indirectly supported Unix time through the time_t type, defined as an arithmetic type capable of representing times, with functions like time() relying on for the specific and encoding. Beyond Unix systems, Unix time gained widespread adoption in non-Unix environments; for example, Microsoft's C runtime library (MSVCRT) implements time() to return seconds since the Unix , facilitating portability on and later versions. Similarly, Java's System.currentTimeMillis() provides milliseconds since the , enabling cross-platform timestamp handling in applications. This global influence underscores Unix time's role as a for interoperable timekeeping in diverse computing ecosystems.

Practical Applications

In Operating Systems

In Unix-like operating systems, Unix time serves as the foundational representation for the system clock, enabling precise tracking of wall-clock time for operations. The , for instance, maintains the current time as seconds and nanoseconds since the Unix (January 1, 1970, 00:00:00 UTC), accessible via system calls such as gettimeofday(), which returns this value in a struct timeval for use in process scheduling, event logging, and time-sensitive decisions. This integration ensures that subsystems, including the scheduler, can timestamp events relative to absolute real-world time rather than just monotonic counters like jiffies, which measure uptime in ticks but are converted or supplemented with Unix time for logging and external synchronization. File systems in these operating systems store timestamps using Unix time to record key about files and directories. In the ext4 file system, widely used in distributions, each inode contains four timestamps: access time (atime), modification time (mtime), change time (ctime), and creation time (crtime, introduced in ext4), all represented as 64-bit values counting seconds (and nanoseconds for finer granularity) since the Unix epoch. These timestamps track when a file was last read (atime), when its content was modified (mtime), when its metadata was altered (ctime), and when it was created (crtime), supporting features like utilities, auditing, and file integrity checks without requiring additional conversions. To maintain accuracy, Unix-like systems synchronize their Unix time-based clocks with external references. On boot, the kernel initializes the system clock from the hardware real-time clock (RTC), a battery-backed device that persists time across power cycles, using interfaces like the hwclock utility to load RTC values into the kernel's timekeeping structure. During operation, NTP daemons such as ntpd or chronyd adjust the system clock against remote servers, applying gradual corrections (slewing) or step adjustments to align with Coordinated Universal Time (UTC), compensating for clock drift typically in the range of milliseconds per day. Variants of Unix-like systems also leverage Unix time for file system operations, often with adaptations for legacy formats. In macOS and BSD derivatives like , the UFS () stores inode timestamps directly as seconds since the Unix , mirroring the standard Unix model for atime, mtime, and ctime to ensure compatibility with . macOS, built on a Unix foundation, uses Unix time system-wide for its APFS file system (default since macOS High Sierra in 2017), storing timestamps natively as 64-bit values representing nanoseconds since the Unix via kernel and user-space like stat() for seamless integration. Even non-Unix systems like Windows incorporate Unix time through internal conversions; the file system uses the FILETIME structure (100-nanosecond intervals since , 1601), but Windows and subsystems convert these to Unix time_t equivalents for interoperability with Unix-compatible tools and protocols.

In Programming and Software

In programming and software development, Unix time serves as a foundational representation for handling timestamps across various languages, libraries, and protocols. The , as defined in standards, provides core functions for manipulating Unix time values. The time() function retrieves the current calendar time as the number of seconds elapsed since the Unix (January 1, 1970, 00:00:00 UTC), returning it as a time_t integer value. Complementary functions like localtime() convert a time_t value into a broken-down time structure (struct tm) adjusted for the local timezone, facilitating human-readable date components such as year, month, and hour. Conversely, mktime() performs the inverse operation, taking a local struct tm and normalizing it to produce a time_t Unix time value, handling ambiguities like transitions. Many programming languages expose Unix time through built-in modules or classes, often extending it to higher precision for modern applications. In , the time module's time.time() function returns the current Unix time as a floating-point number of seconds since the , allowing sub-second accuracy via the fractional part. This value can be converted to a structured format using time.localtime() or formatted as a string with time.strftime(). Similarly, in , the Date.now() static method returns the Unix time in milliseconds since the as an , which is useful for high-resolution timing in applications; for instance, Date.now() yields a value like 1763164800000 for November 15, 2025, 00:00:00 UTC. Unix time is widely adopted in database systems for efficient storage and querying of temporal data. In , the data type internally stores values as the number of seconds since the Unix , supporting automatic updates and timezone conversions while occupying four bytes per value. This format enables straightforward arithmetic operations, such as calculating time differences, and integrates with SQL functions like UNIX_TIMESTAMP() to convert between string dates and Unix time integers. In web protocols, Unix time underpins calculations for headers like HTTP's field, which specifies origination time in RFC 7231 format (e.g., "Wed, 21 Oct 2015 07:28:00 GMT"), but servers often compute these from internal Unix time representations for precision and portability. For data interchange in networked applications, and APIs frequently serialize dates as Unix timestamps to minimize payload size and parsing overhead, representing times as numeric integers or floats rather than verbose strings. This approach ensures interoperability across clients and servers, as demonstrated by libraries such as Luxon, which provides methods like DateTime.fromSeconds() to instantiate date objects from Unix time values and handle conversions to formatted outputs.

Limitations and Challenges

Finite Timestamp Range

Unix time, when implemented using a signed 32-bit for the time_t type, faces a critical limitation due to . The maximum value of 2,147,483,647 seconds since the Unix (January 1, 1970, 00:00:00 UTC) corresponds to January 19, 2038, at 03:14:07 UTC. At this point, adding one more second causes the value to wrap around to -2,147,483,648, equivalent to December 13, 1901, 20:45:52 UTC, potentially leading to erroneous date calculations, system crashes, or security vulnerabilities in affected software. This issue, known as the or Y2K38, primarily impacts 32-bit systems and legacy applications that have not been updated. To address this finite range, Unix time implementations have transitioned to 64-bit signed integers, expanding the representable duration significantly. A signed 64-bit time_t can hold up to 9,223,372,036,854,775,807 seconds after the , corresponding to December 4, 292,277,026,596 , at 15:30:07 UTC—far beyond any practical human timescale. This extension effectively eliminates overflow concerns for the foreseeable future while maintaining compatibility with the Unix convention. Mitigation strategies focus on API and kernel-level updates to support 64-bit time representations without breaking existing 32-bit applications. In , the Time64 provides Y2038-safe functions and types, such as __time64_t and clock_gettime64, which replace 32-bit equivalents when the feature macro _TIME_BITS=64 is defined during compilation. This allows 32-bit systems to use 64-bit time values via compatible system calls, with mapping legacy APIs to their 64-bit counterparts for backward compatibility. In the , support for 64-bit time was integrated starting with version 5.6 in 2020, including reworked timekeeping structures and new system calls like clock_gettime64 to handle 64-bit timestamps even on 32-bit architectures. As of 2025, adoption of 64-bit time support is widespread on server environments, where nearly all modern hardware uses 64-bit architectures like or ARM64, enabling seamless migration to 64-bit time_t. However, embedded systems and devices lag behind, with 32-bit microcontrollers still comprising approximately 44% of the market in 2024 and growing more slowly at a projected CAGR of 17.23% for 64-bit alternatives through 2030. This disparity raises concerns for long-lived deployments, such as industrial sensors or medical devices, where unpatched 32-bit software could face operational failures or exploit risks by 2038.

Handling of Leap Seconds

Leap seconds introduce discontinuities into (UTC), causing system clocks to either repeat the final second of the day or insert an extra second, which results in non-monotonic time progression. This irregularity disrupts assumptions in software that expect continuously increasing timestamps, leading to potential errors in event ordering, , and resource scheduling, especially in distributed systems where precise across nodes is essential for coordinating tasks and preventing race conditions. For instance, in environments relying on (NTP) for , the sudden step can cause clocks to appear to move backward briefly, exacerbating issues in high-precision applications like financial transactions or . To address these challenges, several solutions have been developed at the system level. One prominent approach is , which distributes the extra second gradually over an extended period—typically 24 hours—via incremental adjustments to NTP offsets, ensuring time remains monotonic without abrupt jumps. employs this technique in its public NTP service, applying a linear smear of approximately 0.7 milliseconds per update before and after the leap second to maintain seamless operation across its infrastructure and APIs. standards also support leap second handling through flags in time-related functions, such as the tm_sec field in struct tm, which permits values from 0 to 60 to indicate the insertion, allowing applications and kernels to detect and process the adjustment without halting operations. The practical impact of leap seconds on software has been significant, highlighting vulnerabilities in various implementations. Prior to fixes in 2013, (RMI) systems were prone to crashes during leap seconds due to their reliance on monotonic time for thread and lease renewals, resulting in infinite loops or timeouts when time appeared to regress. Similarly, systemd-timesyncd, the lightweight NTP client integrated into modern distributions like those using , mitigates leap seconds by deferring adjustments to the , which applies the correction automatically upon receiving NTP leap indicators, preventing disruptions in user-space applications. The 2012 insertion notably caused widespread outages, including at Airlines where the reservation system failed for over two hours, forcing manual check-ins for more than 400 flights and stranding thousands of passengers. These recurring issues have fueled an international debate on the future of s, with proposals to abolish them by 2035 to eliminate the risks to global digital infrastructure. The (ITU) and the International Bureau of Weights and Measures (BIPM) have endorsed a to discontinue leap second insertions after that date, allowing UTC to drift gradually from without periodic corrections, thereby prioritizing stability in systems over astronomical precision.

Complementary Systems

Alternative Time Standards

International Atomic Time (TAI) provides a continuous scale of atomic seconds without adjustments for leap seconds, making it suitable for high-precision scientific applications such as physics experiments and satellite operations. As of November 2025, TAI is ahead of UTC by 37 seconds, reflecting the cumulative leap seconds inserted since 1972. This offset ensures TAI maintains a steady progression independent of Earth's irregular rotation, contrasting with Unix time's alignment to UTC. GPS time, utilized in the , operates on a similar continuous basis to but with a distinct starting at 00:00:00 UTC on , 1980. It excludes adjustments, resulting in an offset of 18 seconds ahead of UTC as of 2025. This design supports precise navigation and timing in satellite signals, differing from Unix time's 1970 and second-based granularity. Windows FILETIME represents timestamps as 64-bit integers counting 100-nanosecond intervals since 00:00:00 UTC on , 1601, originating from the Gregorian calendar's implementation in early systems. This format offers sub-second precision for file metadata and system events in Windows environments, unlike Unix time's coarser whole-second increments from a later . The Julian Day Number (JDN) serves astronomy by assigning a unique integer to each whole solar day, commencing at noon on , 4713 BCE in the . It facilitates calculations of celestial events and long-term ephemerides without calendar irregularities, providing a day-count scale rather than Unix time's second-based chronology. standardizes human-readable date and time representations, such as YYYY-MM-DDTHH:MM:SSZ for UTC, to ensure unambiguous international communication. In computing, it is frequently generated from Unix time values for , , and data , emphasizing readability over the compact numerical format of Unix timestamps.

Interoperability with Unix Time

Unix time, representing seconds since the 1970-01-01 00:00:00 UTC , requires specific conversions for with other time standards like GPS and to ensure accurate synchronization across systems. To convert Unix time to GPS time, which counts seconds since the 1980-01-06 00:00:00 UTC/GPS without leap second insertions, the formula is: \text{GPS time} = \text{Unix time} - 315964800 + \text{number of leap seconds since 1980} The constant 315964800 accounts for the 10-year and 5-day epoch difference (3657 days × 86400 seconds/day), while adding the cumulative leap seconds (currently 18 since the GPS epoch) adjusts for UTC's irregularities relative to GPS's continuous count. For conversion to (TAI), a continuous scale without leap seconds, the formula is: \text{TAI} = \text{Unix time} + \text{total leap seconds offset} This offset, currently 37 seconds (10 seconds at the Unix epoch plus 27 leap seconds inserted since 1972), bridges Unix time's UTC basis to TAI's uniform SI seconds. Programming interfaces facilitate these bridges; for example, Python's datetime.utcfromtimestamp(timestamp) converts a Unix timestamp to a UTC-aware datetime object, enabling further manipulations like timezone adjustments or sub-second handling via the datetime module. In the Network Time Protocol (NTP), offsets are managed by subtracting 2208988800 seconds (70 years from NTP's 1900 epoch to Unix's 1970 epoch) during synchronization, allowing NTP servers to align system clocks with Unix time while compensating for network delays up to millisecond precision. Challenges arise in these conversions, particularly with sub-second precision, as traditional Unix time uses integer seconds, potentially truncating fractional components (e.g., milliseconds from GPS) unless extended formats like struct timespec are employed, leading to loss in applications requiring microsecond accuracy. Timezone conversions compound this, relying on the IANA tzdata database to map Unix timestamps from UTC to local times, accounting for historical offsets and daylight saving transitions, but mismatches in tzdata versions across systems can introduce discrepancies of hours. Libraries such as libntp from the NTP distribution provide hybrid clock mechanisms that integrate Unix time with NTP adjustments for seamless synchronization, often combining physical clock reads with logical offsets to mitigate drift. In environments, these are critical for syncing GPS-derived timestamps to Unix time, as seen in protocols using libraries like those in PTP implementations, ensuring devices maintain coherence for timing-sensitive tasks like sensor data logging.

Key Milestones

Significant Timestamps

Unix time begins at the value of 0, corresponding to 1970-01-01 00:00:00 UTC, marking the arbitrary starting point for measuring elapsed seconds in the system as defined by standards. One notable milestone is the "Unix millennium" at seconds, which occurred on 2001-09-09 01:46:40 UTC and was celebrated by technology communities as a symbolic of the epoch. The sequential curiosity of 1,234,567,890 seconds fell on 2009-02-13 23:31:30 UTC, drawing attention from programmers for its aesthetically pleasing digit sequence and prompting informal observances in online forums and events. Another round-number milestone reached 1,600,000,000 seconds on 2020-09-13 12:26:40 UTC, noted in programming communities for its clean numeric value. A significant future threshold is 2,147,483,647 seconds, representing the maximum value for a signed 32-bit integer and equivalent to 2038-01-19 03:14:07 UTC, after which systems relying on this format face potential overflow issues.

Cultural and Media References

Unix time has permeated through celebrations of its milestones, depictions in , and viral phenomena. On September 9, 2001, the Unix reached 1,000,000,000 seconds since the , prompting global events and online commemorations dubbed the "New Billennium." The Danish UNIX User Group hosted a party in , while websites and forums like .com organized virtual gatherings to mark the occasion, highlighting Unix time's role in computing history. In cinema, Unix time indirectly influences portrayals of , with films nodding to its foundational role in Unix systems. The 1995 film Hackers features explicit references to Unix literature, including props like International UNIX Environments and The Design and Implementation of the 4.3BSD Unix Operating System, underscoring the era's reverence for Unix as the bedrock of computing and hacking narratives. Similarly, the iconic "digital rain" code in (1999) evokes timestamp-like cascading counters, symbolizing the simulated world's temporal mechanics rooted in computational timekeeping. These elements have cemented Unix time's association with aesthetics in media. Artistic and culture has embraced Unix time's sequential elegance, particularly round numbers like 1,234,567,890, which occurred on , 2009, at 23:31:30 UTC. This sparked widespread sharing on early social platforms and blogs, with developers hosting "party like it's " events to celebrate its palindromic appeal, turning an abstract metric into a geeky cultural touchstone. As of 2025, awareness of the impending —where 32-bit Unix timestamps overflow—has surged in tech media and podcasts, drawing parallels to the crisis. Outlets like SecurityWeek and have published articles framing Y2K38 as a looming vulnerability exploitable today, while episodes of This Week in Tech discuss mitigation strategies, urging updates to 64-bit systems. Unix time also appears in video games, notably in save file structures. worlds store last-access timestamps in level.dat files as Unix epoch seconds (or milliseconds in some formats), with region files using 32-bit integers for chunk modifications, occasionally leading to humorous "1970 creation date" glitches when values default to zero.

References

  1. [1]
    time
    In a future version of this volume of POSIX.1-2017, time_t is likely to be required to be capable of representing times far in the future. Whether this will be ...
  2. [2]
    Avoiding the year 2038 problem (GNU Gnulib)
    The year 2038 problem denotes unpredictable behaviour that will likely occur in the year 2038, for programs that use a 32-bit signed integer 'time_t' type.
  3. [3]
    <time.h>
    The <time.h> header shall declare the timespec structure, which shall include at least the following members: time_t tv_sec Seconds. long tv_nsec Nanoseconds.
  4. [4]
    time(2) - Linux manual page - man7.org
    Linux systems normally follow the POSIX requirement that this value ignore leap seconds, so that conforming systems interpret it consistently; see POSIX.1 ...Description Top · Errors Top · Versions Top
  5. [5]
    4. General Concepts
    Each file has three distinct associated timestamps: the time of last data access, the time of last data modification, and the time the file status last changed.
  6. [6]
    Weekday Calculator: What Day Is It? - Time and Date
    Day: /. Year: January 1, 1970 is a Thursday. Additional facts. It is day number 1 of the year, 364 days left. It is Thursday number 1 out of 53 in 1970. It is ...
  7. [7]
    Why Was 1 January 1970 Used as the Epoch Time? - Baeldung
    Mar 18, 2024 · In this article, we learned about some notable epoch dates in the computing world, a brief history of Unix time and its limitations, and the ...2. Epoch · 3. The Unix Epoch · 4.2. Year 2038 Problem
  8. [8]
    Why is 1/1/1970 the "epoch time"? - Stack Overflow
    Jul 7, 2009 · Early Unix systems used 1/60s intervals, initially 1971-01-01, then rounded down to 1970-01-01 when time was changed to increment every second.Convert UNIX epoch to Date object - Stack OverflowHow to use a unix epoch timestamp other than Jan 1, 1970?More results from stackoverflow.com
  9. [9]
    Seconds Since the Epoch - Aphyr
    Dec 25, 2024 · People, myself included, like to say that POSIX time, also known as Unix time, is the number of seconds since the Unix epoch, which was 1970-01- ...
  10. [10]
    Google\Protobuf\Timestamp
    The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year ...
  11. [11]
    mktime
    ### Summary: How mktime Handles Time Zones and DST in Relation to Unix Time
  12. [12]
    What is the Year 2038 problem? - Computer | HowStuffWorks
    May 17, 2024 · The maximum value of time before it rolls over to a negative (and invalid) value is 2,147,483,647, which translates into January 19, 2038. On ...<|control11|><|separator|>
  13. [13]
    Why does the year 2038 problem occur in the first place?
    Oct 20, 2020 · The problem is that the Posix data type time_t is an "arithmetic" type, i.e. you are able to add and subtract values from it using C's + and ...Year 2038 problem [closed] - Unix & Linux Stack ExchangeFailure of ntpdate if the system is set to a date beyond 2038More results from unix.stackexchange.com
  14. [14]
    gettimeofday
    ### Summary: Sub-second Precision in Unix Time APIs (gettimeofday)
  15. [15]
    Unix Incompatibility Notes: Byte Order - Jan Wolter
    Byte order is how processors store integers. Big-endian saves the most significant byte first, while little-endian saves the least significant byte first. Unix ...Terminology · Compile-Time Tests · Run-Time Tests
  16. [16]
    time
    The time() function returns a value in seconds (type time_t) while times() returns a set of values in clock ticks (type clock_t).
  17. [17]
    BIPM technical services: Time Metrology
    Coordinated Universal Time (UTC), is the international reference time scale that forms the basis for the coordinated dissemination of standard frequencies and ...
  18. [18]
    RFC 3339 - Date and Time on the Internet: Timestamps
    Paul Eggert provided many careful observations regarding the subtleties of leap seconds and time zone offsets. The following people noted corrections and ...Missing: count | Show results with:count
  19. [19]
    Leap second and UT1-UTC information | NIST
    Current UT1-UTC values ; 2025-05-24, 60819, 29.3 ms ; 2025-05-19, 60814, 30.5 ms ; 2025-05-14, 60809, 28.8 ms ; 2025-05-09, 60804, 29.0 ms ...
  20. [20]
    RFC 8633 - Network Time Protocol Best Current Practices
    ... leap seconds. Doing this will prevent older clients from applying a leap second at the wrong time. When implementing this recommendation, operators should ...<|separator|>
  21. [21]
    [PDF] The UNIX Time-Sharing System* - Nokia
    Unix is a general-purpose, multi-user, interactive operating system for the larger. Digital Equipment Corporation PDP-11 and the Interdata 8/32 computers.
  22. [22]
    [PDF] The Restoration of Early UNIX Artifacts - USENIX
    And in 2002, after much lobbying from TUHS, the PDP-. 11 UNIX systems and 32V were placed under an open- source BSD-style license. System. Released. Features.
  23. [23]
    Unix Manual, first edition - Nokia
    In 1971, when this manual was written, we had moved off the original PDP-7 to the PDP-11/20; it had 24KB of core memory, and no memory management hardware at ...
  24. [24]
    utime
    The utime() function shall set the access and modification times of the file named by the path argument.
  25. [25]
    time, _time32, _time64 - Microsoft Learn
    We don't recommend _USE_32BIT_TIME_T , because your application may fail after January 18, 2038; the use of this macro isn't allowed on 64-bit platforms. Note.Syntax · Return value
  26. [26]
    gettimeofday(2) - Linux manual page - man7.org
    The time returned by gettimeofday() is affected by discontinuous jumps in the system time (e.g., if the system administrator manually changes the system time).
  27. [27]
    ktime accessors - The Linux Kernel documentation
    These are only useful when called in a fast path and one still expects better than second accuracy, but can't easily use 'jiffies', e.g. for inode timestamps.
  28. [28]
    4.1. Index Nodes — The Linux Kernel documentation
    Four timestamps are recorded in the lower 128 bytes of the inode structure -- inode change time (ctime), access time (atime), data modification time (mtime), ...
  29. [29]
  30. [30]
  31. [31]
    Based on thousands of APIs, what is the best approaches ... - Moesif
    Nov 19, 2018 · Date numbers should be stored as Unix Epoch time with the API contract specifying seconds or milliseconds. There is a split opinion between ...
  32. [32]
    The Year 2038 Problem - What it is, Why it will happen & How to fix it
    The 2038 problem occurs when software using 32-bit integers to store dates reaches 1 second after 03:14:07 UTC on 19 January 2038, causing errors.
  33. [33]
    2038 Bug Survival Guide: Lessons From Leap Year Code Issues
    Feb 19, 2024 · The 2038 bug is a problem with how systems store dates/times using a 32-bit integer, causing overflow after Jan 19, 2038, leading to incorrect ...
  34. [34]
    Year 2038 Timestamp Problem - LinuxReviews
    Linux and BSD solved the year 2038 timestamp problem by switching from a 32-bit time_t to a 64-bit time_t . This solution kicks the can down the road to 15:30: ...<|separator|>
  35. [35]
    Y2038ProofnessDesign - glibc wiki - Sourceware
    Sep 19, 2018 · The GLIBC API would use either the old Y2038-incompatible set of socket options or the new Y2038-compatible set depending on __USE_TIME_BITS64, ...Missing: mitigation Y2K38
  36. [36]
    Approaching the kernel year-2038 end game - LWN.net
    Jan 11, 2019 · Timekeeping within the kernel has been reworked to use 64-bit values throughout, even on 32-bit systems, for example. A lot of work was required ...
  37. [37]
    IoT Microcontroller Market Size, Share & Trend Analysis, 2030
    Sep 30, 2025 · By bit class, 32-bit devices led with 44.23% of IoT microcontroller market share in 2024 while 64-bit units are forecast to expand at a 17.23% ...
  38. [38]
    The Y2K38 Bug Is a Vulnerability, Not Just a Date Problem ...
    Oct 7, 2025 · The Year 2036/2038 problem is a bug that will be triggered in more than a decade, but hackers could exploit it today.
  39. [39]
    [PDF] Leap-second considerations in distributed computer systems
    Clocks would gradually converge after a leap second back to UTC within a few minutes, but not in a compatible way, because of different update times and rates.
  40. [40]
    Resolve Leap Second Issues in Red Hat Enterprise Linux
    Aug 3, 2021 · Leap seconds are a discontinuity of civil time. The time does not continue to increase monotonically but it is stepped by one second. Let's ...
  41. [41]
    Leap Smear | Public NTP - Google for Developers
    We have "smeared" the extra second across the hours before and after each leap. The leap smear applies to all Google services, including all our APIs.Our proposed standard smear · Example of the standard smear · Other smears
  42. [42]
    <time.h>
    The identifier for the system-wide monotonic clock, which is defined as a clock whose value cannot be set via clock_settime() and which cannot have backward ...
  43. [43]
    'Leap Second' Bug Wreaks Havoc Across Web - WIRED
    Jul 1, 2012 · Jul 1, 2012 3:48 AM. 'Leap Second' Bug Wreaks Havoc Across Web ... Java application platform -- were unable to cope with the extra second.
  44. [44]
    systemd-timesyncd - ArchWiki
    Aug 27, 2025 · The daemon saves the current clock to disk every time a new NTP sync has been acquired (and every 60 seconds), and uses this to possibly correct ...
  45. [45]
    Leap second hits Qantas air bookings, while Reddit and Mozilla stutter
    Jul 2, 2012 · The Amadeus airline reservation system was disrupted for more than two hours on Sunday, as were a number of high-profile websites including Mozilla, Reddit, ...
  46. [46]
    [PDF] The future of Coordinated Universal Time - ITU
    Apr 3, 2023 · We support the decision of BIPM to discontinue the leap second in practice by 2035. ITU News MAGAZINE No. 02, 2023. 34. Digital networks ...
  47. [47]
    It's Official: The Leap Second Will Be Retired (a Decade from Now)
    Nov 19, 2022 · With Russia's concerns in mind, the leap second is not scheduled to be dropped until 2035, although it could happen sooner. Resolution D calls ...
  48. [48]
    International Atomic Time (TAI) - Time and Date
    On average, Earth has been slowing down a bit over the past decades, so UTC is currently running 37 seconds behind TAI.
  49. [49]
    Standard of time definition: UTC, GPS, LORAN and TAI - Ipses
    UTC, 2025-11-06 03:27:04. GPS, 2025-11-06 03:27:22. LORAN, 2025-11-06 03:27:31. TAI, 2025-11-06 03:27:41. Local time, 2025-11-05 19:27:04 UTC-8. +39 02 394 ...
  50. [50]
    What is the GPS Clock? | GPS Timing | TimeTools Ltd
    Jul 29, 2025 · Therefore, GPS time is ahead of Coordinated Universal Time (UTC) by 18 seconds (as of July 2025). The satellite system does however provide an ...<|separator|>
  51. [51]
    FILETIME (minwinbase.h) - Win32 apps | Microsoft Learn
    Feb 22, 2024 · Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).
  52. [52]
    File Times - Win32 apps - Microsoft Learn
    Jan 7, 2021 · A file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 AM January 1, 1601 Coordinated Universal ...
  53. [53]
    About Julian Dates | aavso
    Astronomers simplify their timekeeping by simply counting the days. All days are numbered consecutively from Julian Day 0, which began at noon on January 1 ...
  54. [54]
    Julian Day - Orbital Mechanics & Astrodynamics
    The Julian day is a single day in the Julian Period, a period of time 7,980 years long. The Julian Period is defined as the product of three cycles in the ...
  55. [55]
    International standard date and time notation
    If a date and a time value are stored together in a single data field, then ISO 8601 suggests that they should be separated by a latin capital letter T, as in ...
  56. [56]
    datetime — Basic date and time types — Python 3.14.0 documentation
    The datetime module provides classes for date and time manipulation, including date, time, and datetime objects, which can be aware or naive.Datetime -- Basic Date And... · Timedelta Objects · Datetime Objects
  57. [57]
    GPS Time Conversion Algorithm
    The GPS Time Converter perfoms conversions between GPS and "human" time. There are many programs and functions available (including the built in php functions ...
  58. [58]
    time - Ticks between Unix epoch and GPS epoch - Stack Overflow
    Dec 11, 2013 · The correct offset value is 315964800 seconds. Explanation: UTC and GPS time deviate (on average) every 18 months by one additional second.UTC time to GPS time converter by Pythongps time, time conversionMore results from stackoverflow.com
  59. [59]
    Leap seconds, Unix time, and TAI time
    Feb 5, 2020 · At the moment, TAI is 37 seconds ahead of UTC. There have been 27 leap seconds since leap seconds were first instituted, and TAI started out 10 ...
  60. [60]
    UTC, TAI, and UNIX time
    For many years, the UNIX localtime() time-display routine didn't support leap seconds. In effect it treated TAI as UTC. Its displays slipped 1 second away from ...
  61. [61]
    RFC 5905 - Network Time Protocol Version 4 - IETF Datatracker
    This document describes NTP version 4 (NTPv4), which is backwards compatible with NTP version 3 (NTPv3), described in RFC 1305, as well as previous versions of ...<|separator|>
  62. [62]
    RFC 1305: Network Time Protocol (Version 3) Specification ...
    RFC 1305: Network Time Protocol (Version 3) Specification, Implementation and Analysis.
  63. [63]
    How precise should I encode a Unix Time? - Stack Overflow
    May 14, 2019 · Instead, times with sub-second precision are represented using composite data types that consist of two integers, the first being a time_t (the ...Understanding sub-second values in a timestamp - Stack OverflowComparing times with sub-second accuracy - python - Stack OverflowMore results from stackoverflow.com
  64. [64]
    Theory and pragmatics of the tz code and data
    It organizes time zone and daylight saving time data by partitioning the world into timezones whose clocks all agree about timestamps that occur after the POSIX ...Missing: sub- | Show results with:sub-
  65. [65]
    How NTP Works
    Nov 23, 2022 · This page provides a technical description of the Network Time Protocol (NTP) architecture and operation.
  66. [66]
    Synchronizing Time with Linux* PTP
    In the Linux* ecosystem, Linux PTP is the most popular implementation of PTP. It supports several profiles including gPTP and AVNU automotive profile.
  67. [67]
    Overview of Time Synchronization for IoT Deployments: Clock ...
    The time synchronization protocol survey aims at providing an overview of different time synchronization components including timestamping, messaging schemes, ...
  68. [68]
    Unix Tick Tocks to a Billion - WIRED
    Sep 8, 2001 · That instant will be an anniversary for the Unix operating system: It marks one billion seconds since midnight on Jan. 1, 1970, which is the ...
  69. [69]
    Unix Lovers to Party Like It's 1234567890 - WIRED
    Feb 12, 2009 · Unix weenies everywhere will be partying like it's 1234567890 this Friday. That's because, at precisely 3:31:30 p.m. Pacific time on February 13 ...
  70. [70]
    WHO Director-General's opening remarks at the media briefing on ...
    Mar 11, 2020 · In the past two weeks, the number of cases of COVID-19 outside China has increased 13-fold, and the number of affected countries has tripled.Missing: Unix | Show results with:Unix
  71. [71]
    New Billennium Party for the Unix epoch - Linux.com
    Sep 7, 2001 · Rob Levin writes, “The New Billennium, the roll-over of the Unix epoch to 1,000,000,000, is arriving on Sunday, September 9, 2001, ...
  72. [72]
    Hackers (1995) - FAQ - IMDb
    How long is Hackers? 1 hour and 45 minutes ; When was Hackers released? September 15, 1995 ; What is the IMDb rating of Hackers? 6.2 out of 10 ; Who stars in ...
  73. [73]
    Digital rain - Wikipedia
    Digital rain, or Matrix code, is the visual effect of vertically falling computer code popularised by the 1999 film The Matrix.
  74. [74]
    Time to Party Like it's 1234567890 » Feross.org
    Feb 14, 2009 · At 3:31:30PM today, the Unix epoch timestamp passed the 1234567890 mark. ... This event is scheduled to happen on 3:14:07 AM on Tuesday, 19 ...
  75. [75]
    New Millennium Bug? The Dangers of the Y2K38 Problem
    Oct 9, 2025 · The Y2K38 problem affects Unix systems, which are used globally across many sectors. The Unix time, based on a 32-bit counting mechanism, ...
  76. [76]
    This Week in Tech 1043 Transcript - TWiT Network
    Aug 4, 2025 · This is TWIT this Week in Tech, episode 1043, recorded Sunday, august 3rd 2025. ... You, you know this, richard, in 2038, the y2k38 bug or the ...
  77. [77]
    Java Edition level format - Minecraft Wiki
    Before 1.16, the lock contained a big endian 64-bit integer timestamp of when the level was last accessed since the epoch. The program, instead of writing a ...