---
title: "Time & clocks"
description: "Clock sync, logical clocks, timestamps, leap seconds"
url: "https://swe.quest/tags/time-clocks?per=12"
---

# Time & clocks

Topic in Distributed systems: Clock sync, logical clocks, timestamps, leap seconds

By difficulty: [Easy](https://swe.quest/tags/time-clocks.md?difficulty=easy) · [Medium](https://swe.quest/tags/time-clocks.md?difficulty=medium) · [Hard](https://swe.quest/tags/time-clocks.md?difficulty=hard)

Posts 1–12 of 18, page 1 of 2, newest first.

## 2026-10-06

- [NTS: Authenticated Time at Meta](https://swe.quest/articles/nts-authenticated-time-at-meta-0d90b1c43ed13ad4.md): Meta Engineering · 2026-10-06 · Hard · 11 min read · Time & clocks, Cryptography, Networking, Security
  Meta's public time service now supports NTS (RFC 8915) at nts.meta.com, authenticating NTP responses so clients can detect forged time, a growing concern as TLS certificate lifetimes shrink toward 47 days and renewals become unattended.

## 2026-09-25

- [Partition Finalization in Pinterest’s Next-Generation DB Ingestion Framework](https://swe.quest/articles/partition-finalization-in-pinterest-s-next-generation-db-ingestion-framework-f8587191e2b11efa.md): Pinterest Engineering · 2026-09-25 · Hard · 11 min read · Stream processing, Data pipelines, Event-driven architecture, Time & clocks
  Pinterest's streaming CDC ingestion (Kafka, Flink, Iceberg, Spark) lost the implicit "partition complete" signal that batch loads provided, so it now derives a partition finalization watermark from event time.

## 2026-03-20

- [Querying DateTimes in ClickHouse](https://swe.quest/articles/querying-datetimes-in-clickhouse-2cdba42b9ef08c40.md): ClickHouse · 2026-03-20 · Medium · 8 min read · SQL, Analytics & OLAP, Time & clocks
  ClickHouse's datetime functions cover rounding, filtering and duration calculations, demonstrated on about 3 million NYC taxi trips. toStartOfHour and toStartOfFifteenMinutes bucket timestamps, casting to ::Time groups or filters by time of day across all dates, and dateDiff computes trip durations to derive average speed, which falls from about 19 mph at 6am to about 11 mph by 8:30am. countIf with toDayOfWeek splits weekday and weekend trips, and the lag window function computes percentage change between windows. formatDateTime and bar make the output readable.

## 2026-03-12

- [5 ways to parse Dates and DateTimes in ClickHouse](https://swe.quest/articles/5-ways-to-parse-dates-and-datetimes-in-clickhouse-af81329ee4e38796.md): ClickHouse · 2026-03-12 · Medium · 4 min read · Analytics & OLAP, SQL, Time & clocks
  ClickHouse offers five main routes for turning raw values into Date/DateTime types. \`fromUnixTimestamp\` and its 64Milli/64Micro variants convert epoch timestamps to \`DateTime\` or \`DateTime64(3/6)\`.

## 2026-01-14

- [One for the Treble, Two for the Time](https://swe.quest/articles/one-for-the-treble-two-for-the-time-c03cd49395ab2de8.md): TigerBeetle · 2026-01-14 · Medium · 5 min read · Payments & fintech, Time & clocks, Databases, Event-driven architecture
  Bitemporal modelling lets an immutable, append-only ledger like TigerBeetle correct past mistakes: record every fact as soon as it is learned, tagged with both a recorded timestamp and an effective timestamp.

## 2025-10-21

- [Tracking Time Without Clock](https://swe.quest/articles/tracking-time-without-clock-7964e27d177f0db1.md): TigerBeetle · 2025-10-21 · Medium · 2 min read · Time & clocks, Testing, Zig, System design
  Instead of threading a full virtualized Clock interface through every component, two lighter patterns often suffice for handling time in reliable systems.

## 2025-02-03

- [How Precision Time Protocol handles leap seconds](https://swe.quest/articles/how-precision-time-protocol-handles-leap-seconds-7f6fcf3729d9faf4.md): Meta Engineering · 2025-02-03 · Medium · 3 min read · Time & clocks, Datacenters, Distributed systems
  Meta handles leap seconds for its nanosecond-precision PTP service by self-smearing inside the fbclock library, which shifts its returned Window of Uncertainty {earliest\_ns, latest\_ns} by 1 ns every 62.5 µs.

## 2025-01-31

- [Fixing JavaScript Timezone Issues](https://swe.quest/articles/fixing-javascript-timezone-issues-f0da06400f048fb6.md): Neon · 2025-01-31 · Medium · 2 min read · JavaScript, Time & clocks, PostgreSQL
  A parking booking app stored Italian users' midnight bookings as 6:00 PM the previous day in a US-hosted Postgres database, because \`new Date(selectedDate)\` attached the browser's local timezone before the value reached the API.

## 2024-07-18

- [Building On-call: Time, timezones, and scheduling](https://swe.quest/articles/building-on-call-time-timezones-and-scheduling-f978980b35f41e6a.md): incident.io · 2024-07-18 · Medium · 11 min read · Time & clocks, Scheduling, Testing, PostgreSQL, Go
  incident.io's on-call scheduler computes who is on shift from rotations with working hours, round-robin handovers and overrides, and getting it right depends on being precise about local time, offsets, IANA timezones, instants and durations.

## 2024-06-27

- [Text Coordinate Systems](https://swe.quest/articles/text-coordinate-systems-5ea8fbb000ee9f93.md): Zed · 2024-06-27 · Medium · 11 min read · Rust, Data structures, Developer tools, Real-time systems, Time & clocks
  Zed represents text positions with several coordinate types, each suited to a different job.

## 2024-02-07

- [Simple Precision Time Protocol at Meta](https://swe.quest/articles/simple-precision-time-protocol-at-meta-1f4dfeb134554941.md): Meta Engineering · 2024-02-07 · Hard · 9 min read · Time & clocks, Networking, Datacenters, Performance engineering
  Simple Precision Time Protocol (SPTP) replaces the subscription-based unicast PTPv2 exchange with a stateless, client-driven three-packet exchange: a delay request (flagged with PTP profile Specific 1), a sync carrying T4, and a followup/announce carrying T1 and CF1.

## 2022-11-21

- [PTP: Timing accuracy and precision for the future of computing](https://swe.quest/articles/ptp-timing-accuracy-and-precision-for-the-future-of-computing-7cb5bf24683b59a5.md): Meta Engineering · 2022-11-21 · Easy · 8 min read · Time & clocks, Datacenters, Networking, Open source
  Meta is rolling out Precision Time Protocol (PTP) across its data centers to replace NTP, moving clock synchronization precision from milliseconds to nanoseconds.

[Next page](https://swe.quest/tags/time-clocks.md?per=12&page=2)

Same list as RSS: [https://swe.quest/feed.xml?tag=time-clocks](https://swe.quest/feed.xml?tag=time-clocks). Lists take `?page=`, `?per=12|24|48|96` and, on the home page, `?tag=` (up to 3), `?source=`, `?difficulty=easy|medium|hard` and `?search=`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
