biff
A simple utility for doing datetime arithmetic, parsing, and formatting. tldr-pages
On several platforms
Several platforms
Print the current time in a format of your choosing
biff time fmt --format rfc3339 nowIdentifyPrint multiple relative times in one command
biff time fmt --format '%c' now -1d 'next sat' 'last monday' '9pm last mon'IdentifyPrint the current time in another time zone and round it the nearest 15 minute increment
biff time in Asia/Bangkok now | biff time round --increment 15 --smallest minuteIdentifyConvert a time between two different time zone
TZ='Japan' biff time in America/New_York 02:30IdentifyPrint a past or future time relative to current time
biff time add -1d nowIdentifyAdd a complex duration to the current time
biff time add '1 week, 12 hours ago' nowIdentifyFind the duration since a date in the past and round it to the desired precision
biff span since 2025-01-20T12:00 --largest yearIdentifyFind timestamps in a log file and reformat them into your local time in place
biff tag lines /tmp/access.log | biff time in system | biff time fmt --format '%c' | head --lines 3 | biff untag --substituteIdentify