# 使用 Homebrew, apk, apt, MacPorts, Nix 安装 htpdate

查看 htpdate 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:htpdate
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install htpdate
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install htpdate
```

  证据: MacPorts ports tree: net/htpdate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add htpdate
```

  证据: Alpine Linux edge package indexes: htpdate from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install htpdate
```

  证据: Debian stable package indexes: htpdate from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#htpdate
```

  证据: nixpkgs package indexes: pkgs/by-name/ht/htpdate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:htpdate
- **软件包管理器:** Homebrew
- **版本:** 2.0.2
- **来源摘要:** Synchronize time with remote web servers
- **主页:** <https://www.vervest.org/htp/>
- **仓库:** <https://github.com/twekkel/htpdate>
- **最后更新:** 2026-05-06T23:49:07Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- htpdate (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.0.2
## 项目历史与用法

htpdate is a small HTTP Time Protocol utility that synchronizes a computer's clock from timestamps in web-server HTTP headers. It is a niche networking package for environments where NTP is blocked, unavailable, or inconvenient but outbound HTTP works.

### 项目历史

The upstream site and repository describe HTP as synchronizing time with web servers as reference sources. htpdate retrieves date and time through HTTP requests, can behave similarly to a browser, works through proxy servers, and can run as a daemon for ongoing synchronization.

The project preserves a pragmatic limitation in its own documentation: usual accuracy is within about 0.5 seconds and can improve with multiple servers, but users needing better time discipline should use an NTP-family package. That framing explains htpdate's evolution as a fallback or constrained-network utility rather than a replacement for NTP, OpenNTPD, or chrony.

### 采用历史

The input package facts record htpdate in Homebrew, Debian, Ubuntu, MacPorts, Nix, and Alpine. That packaging spread is notable for a small tool because its value is situational: it becomes useful exactly on machines and networks where the usual UDP-based time-sync path is not available.

### 使用方式

htpdate is used to query one or more web servers, estimate clock offset from HTTP date headers, and either report or set/adjust local time. The man page and README emphasize proxy support, daemon use, IPv4/IPv6 options, HTTP/1.0 versus HTTP/1.1 behavior, and the tradeoff between convenience and precision.

### 为什么软件包爱好者会关心

For package nerds, htpdate is interesting because it is the kind of tiny utility that justifies a package slot through an edge case. It exists for restricted networks, proxy-only hosts, rescue scenarios, and systems where installing a full time-sync stack is more machinery than the job requires.

### 时间线

- 2021: The twekkel/htpdate tag stream includes v1.3.0 from December.
- 2024: The tag stream includes v2.0.0 from September.
- 2024: Alpine package metadata records htpdate 2.0.0 in the community repository.
- Package-manager era: The input package facts record htpdate in Homebrew, Debian, Ubuntu, MacPorts, Nix, and Alpine.

### Related projects

- htpdate is related to NTP clients such as ntpdate, ntpd, OpenNTPD, and chrony, but trades precision for HTTP reachability and proxy compatibility. The same maintainer also publishes `httpdate`, another HTTP-based time synchronization tool with a precision-oriented approach.

### 来源

- <https://api.github.com/repos/twekkel/htpdate/commits/01d5e9584b22ebf9b166213bfe3f221c039ec4b8>
- <https://api.github.com/repos/twekkel/htpdate/commits/e906bf96eac9ef5a3c0e7546724ff9b2ee817502>
- <https://api.github.com/repos/twekkel/htpdate/tags?per_page=20>
- <https://github.com/twekkel/htpdate>
- <https://github.com/twekkel/htpdate/blob/master/htpdate.8>
- <https://github.com/twekkel/httpdate>
- <https://pkgs.alpinelinux.org/package/edge/community/x86/htpdate>
- <https://www.vervest.org/htp/>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 其他软件包管理器记录

- Debian apt - htpdate - 1.3.7-2+b2: normalized package name match | Debian stable package indexes: htpdate from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | HTTP based time synchronization tool | https://github.com/twekkel/htpdate
- Nix - htpdate: normalized package name match | nixpkgs package indexes: pkgs/by-name/ht/htpdate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - htpdate - 1.3.7-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: htpdate from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | HTTP based time synchronization tool | https://github.com/twekkel/htpdate
- apk - htpdate - 2.0.0-r0: normalized package name match | Alpine Linux edge package indexes: htpdate from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | HTTP Time protocol | https://github.com/twekkel/htpdate
- apk - htpdate-doc - 2.0.0-r0: normalized package name match | Alpine Linux edge package indexes: htpdate-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | HTTP Time protocol (documentation) | https://github.com/twekkel/htpdate
- apk - htpdate-openrc - 2.0.0-r0: normalized package name match | Alpine Linux edge package indexes: htpdate-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | HTTP Time protocol (OpenRC init scripts) | https://github.com/twekkel/htpdate
- MacPorts - htpdate: normalized package name match | MacPorts ports tree: net/htpdate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/htpdate.yml](https://github.com/mxcl/pkgdb/blob/main/combined/htpdate.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
