Skip to main content
P

dsh-current-time

pachellber-marine/dsh-current-time

Puts the exact current time, weekday and UTC instant into the model's runtime context on every step, with a configurable time zone, so it stops guessing today's date.

Install

dsh plugin --profile web add github:pachellber-marine/dsh-current-time

README

dsh-current-time

中文说明

Your model guesses today's date. It has no clock. A long session drifts into the wrong day, "last Friday" resolves to last year, and timestamps in logs stop matching what the assistant told you. This plugin fixes that in one line of config.

It registers a dynamic prompt context that reports the clock on every model step — not once per session, not once per hour. The model sees the current instant, the weekday and the UTC form of the same moment, so relative dates ("tomorrow", "in two hours", "this week") resolve correctly.

Current time: 2026-12-01T01:36:10+08:00 [Asia/Shanghai], Tuesday.
Current UTC time: 2025-11-30T17:36:10Z.
Treat dates and times the user leaves without a zone as Asia/Shanghai unless the user says otherwise.

Why it exists

@deepseek-ai/dsh-time-context already ships a clock inside the harness, but only the standard, cordis and ptc presets declare it, and it refreshes at most once every ten minutes by default. If you run a different composition — or you simply want the exact second on every step, in your own zone, with no extra harness dependency — this plugin is the small, standalone version of that idea.

It is deliberately dependency-free: it imports nothing from the harness and pulls nothing at install time. It needs one service (systemPrompt) that every composition already mounts, so dsh plugin add cannot fail on a missing pre-release package.

Install

dsh plugin add dsh-current-time

Or mount it by hand in your composition:

- name: dsh-current-time
  config:
    timeZone: Asia/Shanghai

Configuration

keydefaultmeaning
enabledtrueTurn the clock off without unmounting the plugin.
timeZone''IANA zone name. Empty means "use the zone the process runs in". An invalid zone is reported in the log and then falls back to the process zone instead of taking the composition down.
refreshIntervalMs00 re-reads the clock on every model step, which is what you want if the point is accuracy. A positive value keeps the prompt smaller by emitting nothing inside that window rather than a stale time.
includeUtctrueAlso report the same instant in UTC.
includeWeekdaytrueAlso name the weekday.
note''One extra line appended to the snapshot, for example a locale hint.

The timestamp is always second-resolution in ISO 8601 with the numeric offset — 2026-12-01T01:36:10+08:00 — not a rounded "about now", so it stays usable for log correlation and deadline arithmetic.

Permissions and data

Reads the local clock. Writes nothing. No network calls, no telemetry, no files. The only thing it contributes is a few lines of text in the model's runtime context, which stays in your session on your machine.

Compatibility

Any DSH composition that provides the systemPrompt service. The prompt context is registered as required, so it also survives suppressRuntimeContext() — a composition that deliberately trims optional runtime facts will still get the clock.

License

MIT

Related plugins