惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
T
The Exploit Database - CXSecurity.com
Cyberwarzone
Cyberwarzone
C
CXSECURITY Database RSS Feed - CXSecurity.com
E
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
Scott Helme
Scott Helme
H
Hacker News: Front Page
I
Intezer
N
News and Events Feed by Topic
V
V2EX - 技术
L
LINUX DO - 热门话题
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 最新话题
K
Kaspersky official blog
S
Securelist
Latest news
Latest news
P
Proofpoint News Feed
C
Cisco Blogs
T
Troy Hunt's Blog
The Register - Security
The Register - Security
V
Vulnerabilities – Threatpost
T
Threat Research - Cisco Blogs
Microsoft Azure Blog
Microsoft Azure Blog
L
LangChain Blog
B
Blog RSS Feed
小众软件
小众软件
T
Tenable Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
SecWiki News
SecWiki News
Jina AI
Jina AI
Know Your Adversary
Know Your Adversary
Recorded Future
Recorded Future
Google Online Security Blog
Google Online Security Blog
D
Docker
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
T
Tor Project blog
A
About on SuperTechFans
U
Unit 42
S
Security Archives - TechRepublic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
O
OpenAI News
NISL@THU
NISL@THU
雷峰网
雷峰网
Vercel News
Vercel News
AWS News Blog
AWS News Blog
L
Lohrmann on Cybersecurity
Google DeepMind News
Google DeepMind News

Hacker News: Front Page

A Eureka machine that thinks like nature and explores what AI cannot Hallucinate – Massively Multiplayer Online Rave Founding GTM Engineer at RamAIn | Y Combinator "US has the troops in place to attack Cuba" per Politico Google employee charged with $1M Polymarket insider trading bet on search term Can we have the day off? U.S. Is Said to Open Criminal Inquiry of E. Jean Carroll Over Accusations Against Trump You should not update your dependencies in 2026 Am I a Bad Friend? Machine Learning Engineer at Pelica | Y Combinator Internet Traffic in Iran Increasing F.B.I. Arrests C.I.A. Official With $40 Million in Gold Bars in His Home iPhones Running iOS 26 Are Freezing FaceTime Calls When They Detect Nudity Warm Up Your MacBook Show HN: Open-Source AI Racing Harness Improving AI labels for viewers and creators I had Codex iterate on its own AGENTS.md 8 times and measured each version against real PRs. The best one still regressed on a clean holdout. I'm Getting Into Mesh Networks... (Meshtastic, MeshCore, and Reticulum) Rust (and Slint) on a jailbroken Kindle. GitHub - fbcouto/deterministic-wave-engine: A hydrodynamic computational model resolving wave-particle duality. 2earth.github.io What Apple and Google are doing to your push notifications Germany Considers Law to Force Social Media Algorithm Boost for State-Approved News FuzzingBrain V2: A Multi-Agent LLM System for Automated Vulnerability Discovery and Reproduction Thranpages :: How Did I Do :: SimCity 3k in 4k Valve raises Steam Deck prices by more than $200 Objective metrics that change the most as we age Gemini, Gophers, and Fingers. Oh My! Alternative Internets Beyond HTTPS Jobs at Reflex | Y Combinator I think Anthropic and OpenAI have found product-market fit DuckDuckGo's AI-free search saw nearly 28% more visits in the week following Google's insistence that people… Stress disrupts hippocampal integration of overlapping events, memory inference Training our own AI models - PostHog Canada to order military plane fleet from Sweden in shift from US suppliers Last.fm is now independent An Update on Composer & Packagist Supply Chain Security Corporations Can Vote in Some Delaware Elections, Judge Says (1) How the ZX80 works GitHub - bingud/filemat: Web-based file manager Declassified CIA Cartography Maps from the 1980s Show HN: I made an emergency page for my family. You should too The VibeSec Reckoning Evolving Webflow for the Agentic Web Italy region: +200% tax on datacenters built in green/agricultural areas Agents Cannot Maintain Systems: The Additive–Transformative Gap in LLM Software Delivery YouTube to Automatically Label AI-Generated Videos & Enhance Labels Tech CEOs are apparently suffering from AI psychosis Incident with Pull Requests, Issues, Git Operations and API Requests GitHub - WilliamSmithEdward/xlide_vscode: Excel VBA integration for VS Code - Tree View / Full Direct VBA Read+Write / LiveShare Compatible / Direct Agentic AI Integrations How Private Equity Bought America’s Essential Services Atomically precise mechanosynthesis of carbon structures on hydrogenated Si(100) by inverted-mode STM I’m tired of talking to AI Mini Micro Go: Support for Generic Methods Unicode 18.0.0 Beyond the Prompt: Claude Code GitHub - craigmccaskill/posthorn: Self-hosted email gateway between your apps and a transactional mail provider (Postmark, Resend, Mailgun, AWS SES, or outbound-SMTP). Three ingress shapes (HTTP form, HTTP API, SMTP). One Docker container, one TOML config. The just-say-no engineer was a ZIRP phenomenon Gear Commit TSDuck – The MPEG Transport Stream Toolkit So, Where Does Next-Token Prediction Leave Us? Stripe is friendly to “friendly fraud” Erin Brockovich made a map to track data centers around the country agent memory: an anatomy How Wikipedia Whitewashes Mao Your AI Tools Are Only as Good as Your Judgment — And That's the Point The OSS Sabotage Manual Became Corporate Best Practice Overview · Cloudflare Flagship docs Xiaomi MiMo Api Open Platform - Token Plan Global Launch Colorado and California Exempt Open Source from Age Attestation From Rust to Ruby Why is the Left No Fun? phloto for my photo flow Big Tech's Anti-Labor Playbook Has Come for Wikipedia More ETFs Than Stocks The worst job interview I ever had DeepSWE Chemistry behind the Garden Grove chemical tank The Melancholy of Slaying Monsters Uber burned through its entire 2026 AI budget in four months. Now its COO is questioning whether it's worth it | Fortune AltTab is introducing a Pro version — and staying open source · lwouis/alt-tab-macos · Discussion #5533 Stop advertising in your commits! | AksDev Xiaomi MiMo Api Open Platform - Token Plan Global Launch Stack Overflow’s forum is dead thanks to AI, but the company’s still kicking... thanks to AI Stack Overflow's forum is dead thanks to AI Founding Software Engineer at Sage Care | Y Combinator The Real Cost of Owning a Home — Eric Turner Is “colorectal cancer” rising in “young people”? What Color is Your Function? – journal.stuffwithstuff.com Uber, Lyft drivers in Massachusetts form first US ride-share union The ballad of TIGIT 'Incredible' milestone reached as Sweden becomes a smoke-free country Minicor | Scalable Desktop Automations Don't Subscribe So Casually Stockholm poised to become leading European geospatial intel player NVIDIA Vera CPU Benchmarks: Olympus Cores Delivering The Best Performance Ever Seen On ARM C64 BASIC: Game Map Overhead “Camera View” Scientists say they’ve reversed brain aging with a simple nasal spray Dropbox CEO Drew Houston to step down after 19 years at helm of cloud storage pioneer AWS Fired the One Employee Who Gave a Damn
GitHub - BurntSushi/biff: A command line tool for datetime arithmetic, parsing, formatting and more.
burntsushi · 2026-05-28 · via Hacker News: Front Page

A command line tool for datetime arithmetic, parsing, formatting and more.

Build status Crates.io

Dual-licensed under MIT or the UNLICENSE.

Documentation

The user guide should be your first stop for understanding the high level concepts that Biff deals with. Otherwise, consult biff --help or biff <sub-command> --help for more specific details.

Alternatively, there is a comparison between other similar tools that might give you a quick sense of what Biff is like.

Brief Examples

Print the current time:

$ biff
Sat, May 10, 2025, 8:02:04 AM EDT

Tip

If you get output like 2025 M05 10, Mon 08:02:04 instead, that's because you likely don't have locale support support configured. That requires setting BIFF_LOCALE and using a GitHub release binary or building Biff with the locale feature enabled.

Print the current time in a format of your choosing:

$ biff time fmt -f rfc3339 now
2025-05-10T08:08:30.101066734-04:00

$ biff time fmt -f rfc9557 now
2025-05-10T08:08:33.420946447-04:00[America/New_York]

$ biff time fmt -f '%Y-%m-%d %H:%M:%S %Z' now
2025-05-10 08:08:48 EDT

Print multiple relative times in one command:

$ biff time fmt -f '%c' now -1d 'next sat' 'last monday' '9pm last mon'
Sat, May 10, 2025, 10:44:39 AM EDT
Fri, May 9, 2025, 10:44:39 AM EDT
Sat, May 17, 2025, 10:44:39 AM EDT
Mon, May 5, 2025, 10:44:39 AM EDT
Mon, May 5, 2025, 9:00:00 PM EDT

Print the current time in another time zone, and round it the nearest 15 minute increment:

$ biff time in Asia/Bangkok now | biff time round -i 15 -s minute
2025-05-10T19:15:00+07:00[Asia/Bangkok]

Add a duration to the current time:

$ biff time add -1w now
2025-05-03T10:34:30.819577918-04:00[America/New_York]

$ biff time add '1 week, 12 hours ago' now
2025-05-02T22:34:44.114109514-04:00[America/New_York]

$ biff time add 6mo now
2025-11-10T10:34:49.023321635-05:00[America/New_York]

Find the duration since a date in the past and round it to the desired precision:

$ biff span since 2025-01-20T12:00
2636h 1m 21s 324ms 691µs 216ns

$ biff span since 2025-01-20T12:00 -l year
3mo 20d 21h 1m 25s 171ms 886µs 534ns

$ biff span since 2025-01-20T12:00 | biff span round -l year -s day
3mo 18d

$ biff span since 2025-01-20T12:00 | biff span round -l day -s day
110d

Find timestamps in a log file and reformat them into your local time in place:

$ head -n3 /tmp/access.log
2025-04-30T05:25:14Z    INFO    http.log.access.log0    handled request
2025-04-30T05:25:17Z    INFO    http.log.access.log0    handled request
2025-04-30T05:25:18Z    INFO    http.log.access.log0    handled request

$ biff tag lines /tmp/access.log | biff time in system | biff time fmt -f '%c' | head -n3 | biff untag -s
Wed, Apr 30, 2025, 1:25:14 AM EDT       INFO    http.log.access.log0    handled request
Wed, Apr 30, 2025, 1:25:17 AM EDT       INFO    http.log.access.log0    handled request
Wed, Apr 30, 2025, 1:25:18 AM EDT       INFO    http.log.access.log0    handled request

Generate a sequence of the next 5 days that are Monday, Wednesday or Friday at a specific time, and then format them in your locale:

$ biff time seq day today -c5 -H 9 -w mon,wed,fri | biff time fmt -f '%c'
Mon, May 12, 2025, 9:00:00 AM EDT
Wed, May 14, 2025, 9:00:00 AM EDT
Fri, May 16, 2025, 9:00:00 AM EDT
Mon, May 19, 2025, 9:00:00 AM EDT
Wed, May 21, 2025, 9:00:00 AM EDT

Print every day remaining in the current month:

$ biff time seq daily --until $(biff time end-of month now) today
2025-05-10T00:00:00-04:00[America/New_York]
2025-05-11T00:00:00-04:00[America/New_York]
2025-05-12T00:00:00-04:00[America/New_York]
2025-05-13T00:00:00-04:00[America/New_York]
[.. snip ..]

Find the last weekday in each of the next 12 months and print them in a succinct format:

$ biff time seq -c12 monthly -w mon,tue,wed,thu,fri --set-position -1 | biff time fmt -f '%a, %Y-%m-%d'
Fri, 2025-05-30
Mon, 2025-06-30
Thu, 2025-07-31
Fri, 2025-08-29
Tue, 2025-09-30
Fri, 2025-10-31
Fri, 2025-11-28
Wed, 2025-12-31
Fri, 2026-01-30
Fri, 2026-02-27
Tue, 2026-03-31
Thu, 2026-04-30

Or print the second Tuesday of each month until the end of the year:

$ biff time seq monthly -w 2-tue --until $(biff time end-of year now) | biff time fmt -f '%a, %F'
Tue, 2025-05-13
Tue, 2025-06-10
Tue, 2025-07-08
Tue, 2025-08-12
Tue, 2025-09-09
Tue, 2025-10-14
Tue, 2025-11-11
Tue, 2025-12-09

Finally, this command will get the last commit date on each file in a git repository, sort them in ascending order, format the datetime to a fixed-width format and then print the data in a tabular format:

$ git ls-files \
    | biff tag exec git log -n1 --format='%aI' \
    | biff time sort \
    | biff time fmt -f '%Y-%m-%d %H:%M:%S %z' \
    | biff untag -f '{tag}\t{data}'
[.. snip ..]
2025-05-05 21:54:09 -0400       src/tz/timezone.rs
2025-05-05 21:54:09 -0400       src/tz/tzif.rs
2025-05-05 22:06:38 -0400       Cargo.toml
2025-05-05 22:06:38 -0400       crates/jiff-static/Cargo.toml
2025-05-07 18:55:23 -0400       scripts/test-various-feature-combos
2025-05-07 18:55:23 -0400       src/error.rs
2025-05-08 08:38:22 -0400       src/tz/system/mod.rs
2025-05-08 16:52:55 -0400       crates/jiff-icu/Cargo.toml
2025-05-08 16:52:55 -0400       crates/jiff-icu/src/lib.rs

To see more examples, check out the user guide or the comparison between Biff and other datetime command line tools.

Installation

The binary name for Biff is biff. It is also on crates.io under the name biff-datetime-cli.

Archives of precompiled binaries for Biff are available for Windows, macOS and Linux. Linux and Windows binaries are static executables.

Alternatively, if you're a Rust programmer, Biff can be installed with cargo. Note that the binary may be bigger than expected because it contains debug symbols. This is intentional. To remove debug symbols and therefore reduce the file size, run strip on the binary.

cargo install biff-datetime-cli

Or, if you want locale support (which is enabled in the binaries distributed on GitHub), then install with the locale feature enabled:

cargo install biff-datetime-cli --features locale

Biff as a library

There is relatively little datetime logic inside of Biff proper. (Except for its RFC 5545 implementation, which may eventually move out to a library.) Most of the datetime logic is instead provided by Jiff. Additionally, localization is provided by ICU4X and integrated with Jiff via jiff-icu.

WARNING

I may ship arbitrary and capricious breaking changes at this point. You have been warned.

Also, no compatibility with date is intended. This is not a drop-in replacement. It is not intended to be. It never will be. And it doesn't give a hoot about POSIX (other than the TZ environment variable). If you need a date compatible program, then go use an implementation of POSIX date. With that said, Biff's biff time fmt command generally supports a strftime syntax that has a large amount of compatibility with GNU date.

If you have use cases serviced by date that aren't possible with Biff, I'd like to hear about them.

Motivation

I built this tool primarily as a way to expose some of the library functionality offered by Jiff on the command line. I was after a succinct way to format datetimes or do arithmetic. So I built this tool.

date is one of those commands that I use infrequently enough, and its flags and behavior is weird enough, that I constantly have to re-read its manual in order to use it effectively. So perhaps there is room for improvement there.

As I progressed in constructing this tool, I quickly found it somewhat limited by the fact that the only data it could process was datetimes. To make Biff much more versatile, I added a biff tag command that looks for datetimes in arbitrary data and wraps them up into a JSON lines format. It's unclear to me how broadly useful folks will find this functionality, but other datetime utilities don't seem to have it.

I also wanted to use Jiff in "anger," and in particular, as part of confidently getting it to a 1.0 state. Is its performance acceptable? Are there APIs missing that are needed for real world programs? And so on. For example, because of my development on Biff, I added a way to hook ICU4X localization into Jiff's jiff::fmt::strtime APIs.

Building

Biff is written in Rust, so you'll need to grab a Rust installation in order to compile it.

To build Biff:

git clone https://github.com/BurntSushi/biff
cd biff
cargo build --release
./target/release/biff --version

Additionally, optional locale support can be built with Biff by enabling the locale feature:

cargo build --release --features locale

Biff can be built with the musl target on Linux by first installing the musl library on your system (consult your friendly neighborhood package manager). Then you just need to add musl support to your Rust toolchain and rebuild Biff, which yields a fully static executable:

rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl

Applying the --features locale flag from above should also work.

Running tests

To run both unit tests and integration tests, use:

cargo test

from the repository root. If you're hacking on Biff and need to change or add tests, Biff makes heavy use of cargo insta for snapshot testing. For example, to run tests with Insta, use:

cargo insta test

And if there are any snapshots to review, you can review them via:

cargo insta review