pi-datetime-extension0.1.0
Current date/time lookup tool for pi — lets models with stale training cutoffs get the real system clock.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-datetime-extension
A pi extension that gives models with stale training cutoffs access to the real current date and time from the system clock.
Why
Models often don't know today's date and guess from their training cutoff — which breaks changelogs, deadline math, and scheduling questions. Pi removed its native date hint in 0.80.7 because injecting the date into the system prompt breaks prompt caching (a date change after midnight invalidates the cache for resumed sessions). This extension takes the on-demand approach: the date costs nothing until the model actually needs it.
Install
pi install npm:pi-datetime-extension
# or from git:
pi install git:github.com/kentaroh-toyoda/pi-datetime-extension
Restart pi afterwards.
What you get
A single tool, get_current_datetime, which returns in one call:
Monday, September 14, 2026 at 11:34:30 GMT+08:00
ISO (UTC): 2026-09-14T03:34:30.153Z
Unix: 1789356870
Timezone: Asia/Singapore
- No parameters — uses the system's local timezone
timezone(optional) — any IANA timezone name (Asia/Tokyo,America/New_York, ...). Invalid names return a clean error.- Zero dependencies — only pi's bundled
typebox
A promptGuidelines bullet nudges the model to call the tool whenever the
current date or time matters ("today", deadlines, timestamps, changelogs)
instead of assuming a date.
License
MIT