@v0idd0/timecheck
v1.0.3
Published
timecheck — unix timestamp converter for unix seconds, unix ms, ISO 8601, RFC 2822, and human-readable strings. Auto-detects input, rewrites unix tokens inside log files, and doubles as a currentmillis.com alternative for incident logs. Zero deps. Free fo
Downloads
330
Maintainers
Keywords
Readme
timecheck
Homepage · GitHub · npm · All tools · Contact
Unix timestamp converter, epoch converter, and log rewrite filter. Paste unix seconds, unix ms, ISO 8601, RFC 2822, or human-readable text; timecheck auto-detects the format, prints every representation, and rewrites unix tokens inside log files in place.
If you were searching for a currentmillis.com alternative that also works on log files, this is the CLI.
$ timecheck 1706482800
input: 1706482800 (unix_seconds)
iso: 2024-01-28T23:00:00.000Z
local: 2024-01-28 23:00:00 UTC (use --tz <name> for local)
unix s: 1706482800
unix ms: 1706482800000
rfc: Sun, 28 Jan 2024 23:00:00 GMT
rel: 2 years ago
day: SundayInstall
npm install -g @v0idd0/timecheckUsage
# Convert any timestamp
timecheck 1706482800
timecheck "2026-04-28T10:14:32Z"
timecheck "Tue, 28 Apr 2026 10:14:32 GMT"
# Now in every format
timecheck
# Show local time in a specific zone
timecheck "2026-04-28T10:14:32Z" --tz Europe/Berlin
timecheck 1706482800 --tz Asia/Jerusalem
# JSON output for scripts
timecheck 1706482800 --json | jq .iso_8601
# Read from stdin
date +%s | timecheck
# Replace unix tokens in a log file in place
tail -f app.log | timecheck --replace-unixWhy teams keep timecheck in runbooks
Most timestamp tools do one conversion and stop. timecheck is built for repeatable workflows:
- Auto-detect mode for mixed inputs (seconds, milliseconds, ISO, RFC 2822).
--replace-unixstream mode that rewrites epoch tokens inside logs in-place.- Stable scriptable CLI output for CI and incident tooling.
That makes it useful for:
- incident triage and postmortem timelines
- log archaeology during handoffs
- shell pipelines feeding parsing jobs
Compared with currentmillis-style tools
timecheck is CLI-first and dependency-free, with stream filtering built in:
| Need | timecheck | Currentmillis-like web converters |
|---|---|---|
| Convert mixed timestamp formats | ✅ | sometimes |
| Rewrite log streams without dropping context | ✅ | usually no |
| Keep output in CI-friendly shape | ✅ | partial |
| Zero install inside shell automation | ✅ | no |
If you need quick single-value checks, those tools are still useful; if you need workflow-grade conversion, this one is usually faster.
Examples you can run immediately
Convert an epoch from a shell variable
ts=$(date +%s)
timecheck "$ts" --tz Asia/JerusalemConvert mixed logs and keep lines intact
cat app.log | timecheck --replace-unix > app.with-readable-times.logFeed parsed data into your own tooling
timecheck "2026-05-18T12:00:00Z" --json | jq '.unix_ms'What it auto-detects
| Input | Source label |
|---|---|
| 1706482800 | unix_seconds |
| 1706482800123 | unix_ms |
| 2026-04-28T10:14:32Z | iso_8601 |
| 2026-04-28 10:14:32+02:00 | iso_8601 |
| Tue, 28 Apr 2026 10:14:32 GMT | rfc_2822 |
| now | now |
The cutoff between unix seconds and ms is ≥ 1e12 (≈ year 2001). If you've got a timestamp in the year 2001 in milliseconds, file an issue and we'll buy you a coffee.
Killer feature: --replace-unix
Most timestamp tools take one timestamp and convert it. timecheck --replace-unix is a stream filter — pipe a log file in, get the same log out with unix timestamps rewritten to ISO:
$ cat /var/log/app.log
[1706482800] auth ok user=alice
[1706482801] db query ms=42
[1706482802] sent reply ms=12
$ cat /var/log/app.log | timecheck --replace-unix
[2024-01-28T23:00:00.000Z] auth ok user=alice
[2024-01-28T23:00:01.000Z] db query ms=42
[2024-01-28T23:00:02.000Z] sent reply ms=12Catches both 10-digit (seconds) and 13-digit (ms) tokens. Leaves smaller numbers (user IDs, sizes, etc.) alone.
Programmatic API
const { parseTimestamp, formatAll } = require('@v0idd0/timecheck');
const parsed = parseTimestamp('1706482800');
const formatted = formatAll(parsed, { tz: 'Asia/Jerusalem' });
// {
// input_source: "unix_seconds",
// iso_8601: "2024-01-28T23:00:00.000Z",
// iso_local: "2024-01-29 01:00:00 Asia/Jerusalem",
// unix_seconds: 1706482800,
// unix_ms: 1706482800000,
// rfc_2822: "Sun, 28 Jan 2024 23:00:00 GMT",
// relative: "2 years ago",
// weekday: "Sunday",
// timezone_used:"Asia/Jerusalem"
// }Exit codes
0— parsed and printed successfully1— could not parse the input2— invalid CLI arguments
From the same studio
vøiddo builds sharp, free-forever CLIs for logs, infra, and the weird timestamps hiding inside both:
@v0idd0/logparse— parse access logs into grouped summaries without shipping them to SaaS@v0idd0/portcheck— see what is listening on your local ports, fast@v0idd0/dotdig— inspect DNS records with sane defaults and clean output@v0idd0/httpwut— explain request failures with timing, headers, and plain-English status help
Full catalog: tools.voiddo.com.
License
MIT — part of the vøiddo tools collection.
Built by vøiddo — a small studio shipping AI-flavoured products, free dev tools, Chrome extensions and weird browser games.
