DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › database design

How to Prepare Servers and Databases for the End of Leap Seconds

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start planning for a world in which UTC no longer receives routine leap-second insertions, but do not plan around a fixed cutover date: the 2022 CGPM decision sets a goal of allowing a larger UT1–UTC difference in or before 2035, while the operational schedule is still unspecified. Inventory every time source, choose one documented synchronization policy per trust domain, separate monotonic timing from UTC display time, and test your entire data path—including PostgreSQL—against stepped, repeated, skipped and smeared seconds.

What the end of leap seconds actually changes

UTC currently uses leap seconds to keep the difference between Earth-rotation time (UT1) and UTC within plus or minus 0.9 seconds. In the traditional positive-leap sequence, the final minute is represented as 23:59:59, 23:59:60, then 00:00:00. The National Institute of Standards and Technology (NIST) documents this purpose and sequence.

As an Amazon Associate I earn from qualifying purchases.

In 2022, the General Conference on Weights and Measures (CGPM), in a decision recognized in International Telecommunication Union (ITU) material, called for increasing the maximum permitted UT1–UTC difference in or before 2035 and ending routine leap-second insertion over the longer term. The sources do not specify the final deployment schedule or exactly how the new operational realization will be implemented. Treat 2035 as a planning horizon, not as a confirmed switchover date.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The change does not make time synchronization irrelevant. It changes the failure modes you must design for. Until a new policy is operational, your systems may still encounter a positive leap, a repeated or frozen second, a negative-leap-like skip, or a frequency adjustment used to smear the change. After routine insertions end, systems will still need traceable, consistent clocks, current civil-time rules and a way to interpret historical records produced under older policies.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Why infrastructure teams must act

Most servers and end-user devices around the world rely on the Network Time Protocol (NTP) to keep their time current, according to the ITU’s 2023 guidance on time synchronization in data centres. NIST identifies data logging, telecommunications and time-distribution services as examples of systems that can be affected by a leap second.

A digital implementation cannot guarantee all three of these properties across a leap event at once: a monotonic time scale, a smoothly varying clock and direct traceability to UTC. An implementation may stop the clock briefly, repeat a displayed second, step the clock, skip a second in a negative adjustment, or alter clock frequency over a smear window. Two otherwise healthy machines can therefore produce different wall-clock representations of the same event.

That ambiguity becomes operationally significant when a wall timestamp is used as an ordering key, a timeout source, a lease deadline, a retry schedule, a certificate-validity check or a database duration. The remedy is architectural: use a monotonic clock for elapsed-time logic, use UTC wall time for audit and human display, and preserve enough source and sequence metadata to reconstruct what happened.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Define a time policy before changing configuration

Inventory every clock dependency

Create an owner-approved inventory for each trust domain (for example, a production cluster, a trading network, a telecommunications domain or a data-centre fabric). Record the source, protocol, software and behavior for every component:

  • NTP servers, pools and authentication or access controls.
  • Precision Time Protocol (PTP) grandmasters, boundary clocks and ordinary clocks.
  • Global Navigation Satellite System (GNSS) receivers and any local oscillator or holdover module.
  • Hypervisor time synchronization, guest-agent settings and host clock sources.
  • Cloud-provider time services, managed database time behavior and platform-specific smear policies.
  • Network appliances, storage controllers, logging collectors, firmware and embedded devices.

For each source, document whether it steps, slews, repeats, freezes, skips or smears around an adjustment; whether it exposes a leap indicator; what happens during holdover; and how operators can see the current stratum, source and synchronization state.

Choose one policy per calculation domain

Do not silently combine a smeared source with a stepped UTC source when their timestamps will be compared, joined or used in one calculation. A source can be perfectly accurate according to its own policy and still disagree with another source by a fraction of a second during a smear. Make the policy explicit in architecture documentation, service-level requirements and runbooks.

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

For ordinary applications, NTP is generally appropriate. ITU guidance describes PTP as the choice for demanding distributed-storage and telecommunications systems that require much tighter uncertainty. The correct choice depends on your required uncertainty, network design, hardware support and traceability requirement; PTP is not automatically better for an application that only needs millisecond-level ordering.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Requirement Typical design question Decision evidence to record
Uncertainty Are milliseconds sufficient, or are microseconds or nanoseconds required? Measured offset and jitter under normal load and failover
Time scale Must records be traceable to UTC, to TAI, or only internally consistent? Declared scale, conversion rules and source metadata
Leap behavior Can the domain tolerate a step, repeated label or smear? Chosen behavior and expected application response
Failure mode What is acceptable during source loss or oscillator holdover? Maximum holdover interval, alert threshold and fallback source
Reproducibility Can an historical event be reconstructed after a correction? Raw timestamp, normalized instant, sequence and clock identity

Separate clocks by purpose

Every service should make a deliberate choice for each timing operation:

  • Monotonic clock: use for elapsed durations, timeout and retry calculations, lease expiry, backoff, scheduler intervals and latency measurement. It must not be converted to a civil date by assuming that it advances at a fixed relationship to UTC.
  • UTC wall clock: use for audit timestamps, user-visible dates, protocol fields that explicitly require UTC and correlation with external systems. Store the source and synchronization status when the record’s provenance matters.
  • Sequence or logical clock: use as a tie-breaker when multiple events can share a wall timestamp. An ingestion ID, producer sequence or database-generated event number provides total ordering without pretending that wall time is unique.

Server preparation runbook

1. Establish a baseline

  1. List all time sources and consumers in the trust-domain inventory.
  2. Capture current offset, frequency correction, stratum or PTP state, leap indicator, source identity and holdover status.
  3. Map where timestamps are generated, transformed, queued, persisted, displayed and exported.
  4. Identify every component that applies a smear or hides a leap indicator.
  5. Assign an owner and escalation path for each source and each high-impact consumer.

Include virtual machines and managed services. A guest can inherit a host correction while also running its own synchronization daemon; that combination can create unexplained steps or frequency changes even when each layer appears healthy in isolation.

2. Publish the domain policy

Write a short policy that states the selected source hierarchy, protocol, leap behavior, allowed offset, maximum holdover, alert thresholds and fallback sequence. State whether records are UTC or another declared scale. Require services that exchange timestamps to belong to compatible policy domains or to carry enough metadata to convert and compare them safely.

3. Configure and patch through normal support channels

Update operating systems, hypervisors, NTP and PTP daemons, GNSS receivers and firmware through the vendor’s normal release process. Read the release notes for leap-indicator handling, smear defaults, leap-table updates and behavior when a source disappears. Keep a change record containing the version, configuration, source and rollback plan. The absence of a confirmed global cutover date is not a reason to defer routine patching.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Monitor behavior, not only offset

An offset dashboard alone can miss a dangerous policy mismatch. Alert on:

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  • Stratum changes, source changes and loss of the preferred source.
  • PTP grandmaster identity, announce or sync-state changes and path asymmetry where available.
  • Leap indicators and any transition into or out of smear mode.
  • Offset, jitter, frequency correction and oscillator holdover duration.
  • Disagreement between independent sources or between host and guest clocks.
  • Clock corrections applied to a node, with an immutable audit trail.

Retain these records long enough to explain timestamp anomalies in logs, transactions and incident timelines. A correction event without its source policy is often impossible to interpret later.

5. Rehearse before production

Use a staging environment that follows the production topology. Replay a positive leap, a repeated or frozen 23:59:59, a negative-leap-like skipped second and the smear profile selected by your domain. Exercise source failure and recovery as well as normal operation. The test must begin at the clock source and end at the database, message queue, logs, scheduler, certificate checks, backup and analytics systems.

PostgreSQL and other databases

What PostgreSQL represents

PostgreSQL stores timezone-aware values internally in UTC and uses IANA time-zone data for civil-time conversion. Its documented seconds range is 0 through 59, and its documentation notes that PostgreSQL does not use UTC in the strict leap-second sense because leap seconds are not handled. Consequently, do not assume that timestamp or timestamptz can faithfully encode 23:59:60.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This limitation is separate from daylight-saving and political time-zone changes. Keep the IANA time-zone data current even after routine leap insertions end; the end of leap seconds does not remove the need for civil-time updates.

Use a schema that preserves ordering and provenance

For an event stream, store a normalized instant plus a deterministic tie-breaker. A practical pattern is:

CREATE TABLE event_log (
  event_id       bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  event_time_utc timestamptz NOT NULL,
  producer_seq   bigint,
  source_time    text,
  source_clock   text,
  time_status    text NOT NULL,
  payload        jsonb NOT NULL
);

The normalized UTC value supports ordinary queries. The identity column or producer sequence supplies total ordering when two events have the same wall timestamp. The original source value and clock metadata preserve traceability for legal, scientific or incident-analysis requirements. Define allowed values for time_status—for example, synchronized, holdover, smeared or normalized-leap—using a constraint or reference table rather than relying on undocumented strings.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Handle a seconds value of 60 deliberately

RFC 3339 permits a seconds value of 60 for an actual leap second, but many database parsing paths do not. Treat such input as an explicit validation case and choose one policy:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Reject: return a clear validation error and retain the rejected message for investigation.
  • Normalize: map it to an agreed representable instant and set a flag that records the normalization.
  • Preserve raw input: store the original string and source metadata alongside a normalized value, with an explicit status indicating that the source used a leap label.

Do not silently turn 23:59:60 into an ordinary second. Silent normalization destroys the information needed to reconcile an external protocol or scientific record.

Do not calculate elapsed time from wall timestamps

Subtracting two wall-clock values across a step, repeated second or smear can produce a duration that is too short, too long or negative. Producers should measure elapsed time with a monotonic clock and send that duration, or send start and end measurements accompanied by the producer’s timing policy. Database queries can still compare UTC instants for calendrical reporting, but timeout, lease, retry and service-level calculations should use monotonic measurements.

Design indexes and queries for ties

If an index or query orders only by event_time_utc, equal timestamps can be returned in an implementation-dependent order. Use a stable secondary key:

SELECT event_id, event_time_utc, payload
FROM event_log
WHERE event_time_utc >= $1
  AND event_time_utc <  $2
ORDER BY event_time_utc, event_id;

For producer-originated ordering, use ORDER BY event_time_utc, producer_seq, event_id and define what happens when a sequence is missing or duplicated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

End-to-end test matrix

Test the complete path rather than only the time daemon. NIST notes that repeated timestamps make event ordering and interval calculations ambiguous, so assertions must use sequence IDs or monotonic measurements in addition to wall time.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Scenario What to inject or simulate Assertions
Stepped positive leap Clock step or leap indication at the boundary No duplicate primary keys; audit records show the correction; services remain available within policy
Repeated or frozen second Two samples labelled 23:59:59 or a paused clock Event order follows sequence or monotonic data, not wall time alone
Negative-leap-like skip Remove one representable second from the test timeline Schedulers, windows, retries and parsers do not assume every label exists
Smear profile Apply the selected frequency change over its documented window All members of the calculation domain agree; mixed-source alarms fire if a stepped source is introduced
Source disagreement Feed independent sources with different policies or offsets Monitoring identifies the mismatch and the service follows the documented source hierarchy
Identical wall timestamps Emit multiple events with the same UTC value Database and queue consumers preserve deterministic ordering
Duration and timeout Move wall time backward, forward and through a smear Lease expiry, retry backoff and latency use monotonic measurements
Primary-source failure Withdraw the preferred NTP, PTP or GNSS source Failover occurs within the holdover budget and produces an operator-visible status
Restore and replay Restore raw and normalized records after a simulated correction Historical events remain explainable and can be reprocessed without losing source labels

Operational safeguards for queues, certificates and backups

Message queues and event pipelines

Carry the producer sequence, source clock identity and synchronization status with messages that cross trust domains. Consumers should not discard two messages merely because their wall timestamps match. If a queue assigns its own ordering token, retain that token with the normalized event time.

Schedulers, leases and retries

Use monotonic deadlines calculated from a captured monotonic start point. If a scheduler persists a future deadline across a reboot, persist both the UTC wall estimate for operator visibility and the policy used to derive it; recompute the active monotonic deadline when the process starts.

Certificates and security controls

Certificate validity checks depend on wall time. Test the validation library and any hardware security module near a correction, including a repeated label and a source step. Keep security logs’ UTC timestamp, sequence and source status together so an apparent reversal in time is not mistaken for tampering.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Backups and analytics

Back up raw source timestamps as well as normalized columns. Analytics jobs that bucket by minute or calculate intervals must declare whether they use wall time, a smear-adjusted timeline or producer-measured duration. Replay tests should verify that rerunning a historical batch produces the same ordering and aggregates.

Migration and governance timeline

Now: establish observability and data contracts

  • Complete the inventory and assign owners.
  • Document NTP, PTP, GNSS, hypervisor and cloud behavior.
  • Add monotonic timing to libraries and service contracts.
  • Add sequence and source metadata to event schemas.
  • Begin collecting correction and holdover audit records.

Before an announced operational change

  • Review advisories from IERS, ITU, NIST, operating-system projects, database projects and timing vendors.
  • Confirm that every trust domain has one declared policy and a tested fallback.
  • Run the full matrix against the exact versions and firmware used in production.
  • Check dashboards, on-call procedures, backup replay and compliance reports for assumptions that every minute has 60 labelled seconds.

After the change is deployed

  • Compare independent sources and verify that the observed UT1–UTC behavior matches the published policy.
  • Keep compatibility handling for historical leap-labelled records.
  • Continue updating IANA time-zone data and ordinary time-synchronization software.
  • Retain the pre-change runbooks and test evidence so old records can be interpreted years later.

Requirements, costs and procurement decisions

The primary guidance does not provide a universal migration-cost statistic or a complete vendor-by-vendor release calendar. Budgeting therefore has to be based on your estate rather than on a single industry figure.

Cost and effort usually follow the number of clock sources, the amount of firmware and operating-system diversity, the need for PTP-capable network hardware, the retention period for raw timing metadata and the number of applications that currently subtract wall-clock timestamps. Teams with controlled-source requirements may evaluate a dedicated NTP server appliance; tighter uncertainty or telecommunications requirements may require PTP grandmasters, GNSS timing and specialist synchronization work. Verify current product availability and support commitments separately before purchasing.

Design review checklist

  • Can you name the source, protocol and leap behavior for every production host?
  • Is one policy documented for every domain in which timestamps are compared?
  • Are elapsed-time operations based on a monotonic clock?
  • Do audit records include UTC value, source identity and synchronization status?
  • Can the database represent or preserve an incoming 23:59:60 without silent data loss?
  • Is there a sequence or ingestion key for events with identical wall timestamps?
  • Have you tested stepped, repeated, skipped and smeared behavior end to end?
  • Do alerts cover source changes, leap indicators, frequency correction, holdover and disagreement?
  • Can you restore raw and normalized timestamps and reproduce historical ordering?
  • Do you have an owner watching future IERS, ITU, NIST, operating-system, database and timing-vendor advisories?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

database designleap secondsNTPPostgreSQLPTPserver administrationtime synchronizationUTC

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.