<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-an-http-header-caused-time-gov-to-skew-from-utc-bx8wwerln" -->

---
title: How an HTTP header caused time.gov to skew from UTC
description: A deep dive into why time.gov displayed inaccurate clock offsets. The root cause was the HTTP `Connection: close` header, which forced browsers to create a new...
canonical: https://daily.dev/posts/how-an-http-header-caused-time-gov-to-skew-from-utc-bx8wwerln
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How an HTTP header caused time.gov to skew from UTC | daily.dev
og:description: A deep dive into why time.gov displayed inaccurate clock offsets. The root cause was the HTTP `Connection: close` header, which forced browsers to create a new...
og:url: https://daily.dev/posts/how-an-http-header-caused-time-gov-to-skew-from-utc-bx8wwerln
og:image: https://api.daily.dev/og/posts/bx8wWErLn.png
og:image:alt: How an HTTP header caused time.gov to skew from UTC
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How an HTTP header caused time.gov to skew from UTC

**[Lobsters](https://daily.dev/sources/lobsters)** · 9 min read · 3 upvotes · 1 comments

## Summary

A deep dive into why time.gov displayed inaccurate clock offsets. The root cause was the HTTP `Connection: close` header, which forced browsers to create a new TCP+TLS connection for every request. The JavaScript timing code assumed a single network round-trip (like NTP), but actually measured three, introducing a full round-trip worth of error. NIST fixed the issue around April 24th by switching to `keep-alive`. The author also proposes using the `PerformanceResourceTiming` API for more precise measurement of just the HTTP layer, and provides a client-side patch demonstrating the improvement.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://alexsci.com/blog/how-time-gov-works>

## Similar posts on daily.dev

- [Server Timing: Measure And Track Backend Performance](https://daily.dev/posts/server-timing-measure-and-track-backend-performance-m1j2axzux) · DebugBear · 6 upvotes · 2 comments
- [Fixing the URL params performance penalty](https://daily.dev/posts/fixing-the-url-params-performance-penalty-61quehkfp) · Web Performance Calendar · 1 upvotes · 0 comments
- [HTTP1 vs HTTP2 vs HTTP3](https://daily.dev/posts/http1-vs-http2-vs-http3-wbpqmgwlo) · System Design Newsletter · 170 upvotes · 5 comments
- [Help desk read useless script, so techies made their own fix](https://daily.dev/posts/help-desk-read-useless-script-so-techies-made-their-own-fix-2feveop70) · The Register · 0 upvotes · 0 comments
- [HTTP/2 and HTTP/3: what changed and why it matters](https://daily.dev/posts/http-2-and-http-3-what-changed-and-why-it-matters-kxd7rny7x) · Flavio Copes · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/how-an-http-header-caused-time-gov-to-skew-from-utc-bx8wwerln)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How an HTTP header caused time.gov to skew from UTC","url":"https://daily.dev/posts/how-an-http-header-caused-time-gov-to-skew-from-utc-bx8wwerln","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-an-http-header-caused-time-gov-to-skew-from-utc-bx8wwerln"},"datePublished":"2026-05-07T00:26:18.667Z","dateModified":"2026-05-07T00:26:46.546Z","description":"A deep dive into why time.gov displayed inaccurate clock offsets. The root cause was the HTTP `Connection: close` header, which forced browsers to create a new...","image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","thumbnailUrl":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/how-an-http-header-caused-time-gov-to-skew-from-utc-bx8wwerln","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"javascript","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"How an HTTP header caused time.gov to skew from UTC"}]}
```

