- bttf is a free, open-source CLI datetime tool built in Rust for arithmetic, formatting, and time zone conversions.
- This CLI datetime tool handles everything from log file timestamp reformatting to generating recurring calendar sequences.
- bttf pipes cleanly with other Unix commands, making it genuinely useful in shell scripts and developer workflows.
- Most of its datetime logic comes from Jiff, a Rust library also maintained by the same developer, Andrew Gallant.
A CLI Datetime Tool That Actually Does Everything
If you’ve ever tried to do serious datetime work in a terminal, you know how painful it gets fast. The built-in date command varies wildly between Linux and macOS. Python one-liners work, but they’re clunky. And most dedicated tools handle either formatting or arithmetic — rarely both, and almost never time zones too. That’s the gap bttf, a new open-source CLI datetime tool, is trying to fill.
Built by Andrew Gallant — better known in the Rust community as BurntSushi, the author of tools like ripgrep and the regex crate — bttf lands with serious credibility behind it. Gallant isn’t the type to ship half-finished software, and bttf reflects that. It’s dual-licensed under MIT and the Unlicense, available on crates.io, and ships precompiled static binaries for Windows, macOS, and Linux.
The name is a nod to Back to the Future, which is either charming or groan-worthy depending on your tolerance for developer humour. Either way, the tool itself is hard to dismiss.
What This CLI Datetime Tool Actually Does
The headline feature is the sheer breadth of operations bttf supports. This isn’t just a formatter or a timezone converter — it’s a CLI datetime tool that handles the entire lifecycle of working with time on the command line.
At its simplest, running bttf with no arguments prints the current local time in a human-readable format. But that’s barely scratching the surface. You can format timestamps against any standard — RFC 3339, RFC 9557, strftime patterns — and you can do it for multiple relative times in a single command. now, -1d, next sat, last monday, 9pm last mon — all valid inputs, all resolved in one shot.
Arithmetic is where things get genuinely interesting. Add or subtract durations using natural language-ish syntax: -1w, 6mo, 1 week, 12 hours ago. The tool handles DST transitions correctly — something that trips up a surprising number of datetime implementations. Add six months to a date in November and you’ll get the right offset, not a naive UTC addition that ignores daylight saving.
Time Zones, Spans, and the Power of Piping
One area where bttf really separates itself is time zone handling. The bttf time in subcommand converts timestamps to any IANA time zone — Asia/Bangkok, America/New_York, whatever you need — and you can chain that conversion directly into rounding operations. Want the current time in Bangkok rounded to the nearest 15-minute increment? That’s a two-command pipe.
The span subcommand is equally well thought out. Ask it how long it’s been since January 20, 2025, and you can get the answer in raw hours and minutes, or broken down by years, months, and days, or rounded to whichever precision level makes sense for your use case. The output is composable — pipe it into bttf span round to clean it up further.
This composability is one of bttf’s defining design choices. The tool follows Unix philosophy closely: each subcommand does one thing and produces output that feeds naturally into the next. The bttf tag and bttf untag commands are the mechanism that makes this work for real-world data. Tag attaches datetime metadata to lines of text; untag strips it back out after you’ve done your transformations. The practical result is that you can take a server log full of UTC timestamps and reformat every single one to your local time with a three-command pipeline — no scripting required.
CLI Datetime Tool for Developers and Ops Teams
The use cases here split pretty cleanly into two audiences. Developers get the git integration, the crates.io availability, and the ability to install via cargo install bttf. The tool’s sequence generation — bttf time seq — is genuinely powerful for scripting: generate the next five Mondays, Wednesdays, and Fridays at 9am, or find the last weekday in each of the next 12 months, or print the second Tuesday of every month until year-end. That kind of calendar logic is extraordinarily tedious to write by hand.
Ops and DevOps teams get the log parsing story. The ability to find timestamps in access logs and reformat them in-place, in a pipeline, without a custom script, is the kind of quality-of-life improvement that saves real time over weeks and months of daily use. The static Linux binary matters here too — no dependency issues, no runtime requirements, just drop it on the server and run it.
Built on Jiff, Not Reinvented From Scratch
One detail worth flagging for Rust developers: bttf doesn’t contain much of its own datetime logic. Gallant has been explicit about this. The heavy lifting — timezone resolution, arithmetic, span calculations — comes from Jiff, his own Rust datetime library that’s been gaining traction as a modern alternative to the chrono crate. The one exception is bttf’s RFC 5545 (iCalendar recurrence rules) implementation, which handles the sequence generation features. Gallant has noted that even this may eventually move out into a standalone library.
This architecture means bttf benefits directly from improvements to Jiff, and it keeps the CLI tool lean. It’s a smart separation of concerns — the library handles correctness, the CLI handles ergonomics.
Locale support deserves a mention too. Out of the box, if your system locale isn’t configured, you’ll get ISO-style output rather than the natural-language format. The GitHub release binaries ship with the locale feature enabled, but if you’re building from source via cargo you’ll need to add –features locale explicitly. It’s a minor friction point, but one worth knowing about before you wonder why your dates look wrong.
How bttf Compares to the Alternatives
The obvious comparison points are dateutils, the GNU date command, and various Python/Ruby one-liners that developers have standardised on. dateutils is powerful but has a steep learning curve and inconsistent syntax across its many subcommands. GNU date is ubiquitous but intentionally limited, and its macOS equivalent diverges enough to break scripts. Python works, but spinning up an interpreter to parse a timestamp in a shell script always feels like overkill.
bttf’s closest spiritual relative is probably jq — not because they do the same thing, but because they fill the same role: a well-designed, composable, Unix-native tool that makes a previously painful domain genuinely pleasant to work with from the terminal. That’s a high bar, and it’s one bttf appears to clear.
The Rust ecosystem has been steadily producing this category of developer tool — ripgrep, fd, bat, delta, and now bttf — and the pattern is consistent: take something developers have been bodging together with older tools, build it properly with modern correctness guarantees, and ship it as a single static binary. Whether bttf becomes as ubiquitous as ripgrep remains to be seen, but given Gallant’s track record and the genuine utility on offer, it’s got a strong shot.

