datetime-advanced

Public

Forked from karmakazi/datetime

Advanced LM Studio plugin for current datetime, timezone-aware timestamp interpretation, and relative time comparison.

97 Downloads

README

English | 日本語 | 简体中文 | 한국어 | Español

Datetime Advanced for LM Studio

Version 1.1.0

Give local models structured current time, timezone-aware timestamp interpretation and comparison with a reference time. Use tool results instead of guessing dates from model memory. Each tool works independently of the rest of the Advanced series.

Changelog

Installation

Install yuanjumay/datetime-advanced from LM Studio Hub and enable it in the chat. Use a model that supports tool calling.

Quick start

  • Enable the plugin’s two tools with a model that supports tool calling.
  • Ask for the current date/time, or provide a timestamp with an explicit offset and ask to convert it to a named timezone such as Asia/Tokyo.
  • Use the returned UTC/local times and differences to check whether the timestamp is past, present or future. The system timezone is used when none is specified.

Tools

ToolPurpose
Current Datetime AdvancedReturn UTC/local date and time, timezone, weekday and Unix seconds/milliseconds.
Interpret Datetime AdvancedParse input and compare with now or a supplied reference.

Usage

Ask for today’s date, convert a UTC timestamp, or check how old a download’s downloadedAt metadata is. Current Datetime Advanced accepts optional timeZone such as Asia/Tokyo; default is the system’s IANA timezone, falling back to UTC. Interpret Datetime Advanced takes required input, optional timeZone and optional now. Usually omit now to use the actual current time.

{"input":"2026-07-08T13:01:12.958Z","timeZone":"Asia/Tokyo"}

Interpretation returns inputUtc, inputLocal, nowUtc, nowLocal, differences in milliseconds/seconds, relation (past, present, future) and English humanReadable. A difference within ±60 seconds is classified as present; relative months/years are approximate. UTC and local dates may legitimately differ.

Limits and troubleshooting

Prefer ISO 8601 with Z or an explicit offset. Input also accepts contemporary Unix seconds/milliseconds and compact YYYYMMDD; other strings use JavaScript Date parsing and can be ambiguous or normalized. Numeric timestamp detection covers only the implementation’s contemporary ranges, not every historical/future Unix value. Invalid input/reference returns invalid_datetime / invalid_reference_datetime; invalid IANA zones can fail formatting. Results depend on the computer clock and timezone data, not an online time service.

Development and validation

From a local checkout, run the following in this plugin’s directory. Development files and tests are available in the source checkout, not necessarily in the Hub download.

npm ci
lms dev --install

The plugin registers a tools provider only. It does not edit attachments, create a document archive or require network access/API keys. For development use npm run dev. Review actual clock and timezone output in LM Studio with a tool-capable model.

Credits and license

Fork of karmakazi/datetime. Advanced changes: Yuan Jumay.

MIT. Original copyright and license notices are preserved.