npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-localise-timestamps

v0.1.1

Published

Rewrites UTC timestamps in OpenCode replies into your local timezone

Readme

opencode-localise-timestamps

Rewrites UTC timestamps in OpenCode replies so they read in your local timezone.

When an assistant message says "merged by you at 03:45 UTC", you shouldn't have to do clock arithmetic. This plugin scans every assistant reply as it completes and converts the UTC times it finds:

| The model writes | You see | | --- | --- | | 2026-08-24T03:45Z | 2026-08-24T13:45:00+10:00 | | 03:45 UTC | 03:45 UTC (13:45 local) | | 2026-08-24 03:45 UTC | 2026-08-24 03:45 UTC (13:45 local) — or (2026-08-23 23:45 local) when the local date differs |

ISO instants are replaced outright with the equivalent offset form; prose forms keep their original text and gain a parenthesised annotation, so nothing is lost.

Requirements

OpenCode ≥ 1.18 (plugin API). No configuration — the target zone is your machine's local timezone, resolved per-timestamp so DST is handled correctly.

Install

Add to ~/.config/opencode/opencode.json:

{
  "plugin": ["opencode-localise-timestamps"]
}

Restart OpenCode. The plugin auto-installs from npm on startup.

Behavior

  • What's converted — ISO-Z instants (…T03:45Z, with or without seconds/fractional seconds), prose datetimes (2026-08-24 03:45 UTC), and bare times (03:45 UTC, 03:45:12 GMT, any casing). Offsets like UTC+10 or UTC-5 are left alone.
  • Dateless times03:45 UTC carries no date, so it's anchored to today's UTC date before converting.
  • Impossible values25:30 UTC or 2026-02-30T00:00Z pass through untouched.
  • Model context — parenthetical annotations are stripped again before messages re-enter model history (experimental.chat.messages.transform), so the model never sees doubled timestamps. ISO replacements stay: they're standard timestamps describing the same instant.
  • Scope — assistant text parts only. Tool output panels and your own messages are untouched. Timestamps inside code blocks are converted too; if that ever bites, quote them differently (UTCutc in a comment won't help, but rephrasing will).
  • Failure mode — every hook is guarded; a formatting error can never break streaming.

Development

bun install
bun run typecheck
bun test

To try a local checkout, point opencode.json at the file instead of the npm spec:

{
  "plugin": ["/absolute/path/to/opencode-localise-timestamps/src/index.ts"]
}

Releasing

Two equivalent paths — both run checks, build dist/, and publish to npm:

  • Actions UI: Actions → Release → Run workflow (on main), pick breaking / minor / bugfix. The workflow opens a short-lived release/vX.Y.Z PR (satisfying protected-main rules like CodeQL), waits for it to merge, tags the merged commit, and publishes.
  • Tag push: bump package.json via a PR, then git tag v0.1.0 && git push origin v0.1.0.

Publishing uses npm trusted publishing (OIDC): the package declares this repo and release.yml as its trusted publisher, so releases need no stored npm token. For fully hands-off releases, also add a RELEASE_PAT secret (a PAT with repo contents + pull-request write): the release PR is then authored by you, so its checks skip GitHub's "workflow awaiting approval" gate that applies to bot-authored PRs. Without it, each release PR needs one manual "Approve and run" click.

License

MIT