datetime-timezones

datetime-timezones is a skill for Claude Code, Codex from cass-2003/local-workflow-skill. It costs 132 tokens per session (3,505 once invoked), scanned A, original, MIT.

A guide to representing dates, times, time zones, and daylight-saving changes in software. It covers standard formats, UTC, Unix timestamps, and the difference between a fixed moment and a local calendar time.

In plain words
What is it for?
Use it for scheduling, reports, databases, international applications, and debugging time conversions across regions.
Why use it?
It prevents bugs such as shifted dates, missing hours, and duplicated hours when users or servers are in different regions. It also helps choose what to store and what to display.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for scheduling, reports, databases, international applications, and debugging time conversions across regions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cass-2003/local-workflow-skill/datetime-timezones
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cass-2003/local-workflow-skill --skill datetime-timezones
Clone the repo
git clone --depth 1 https://github.com/cass-2003/local-workflow-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for datetime-timezones

README.md
[![agentmods](https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/datetime-timezones/github.svg)](https://agentmods.dev/skills/cass-2003/local-workflow-skill/datetime-timezones)
Your own site
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/datetime-timezones"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/datetime-timezones/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for datetime-timezones

Your own site · 80×15
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/datetime-timezones"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/datetime-timezones.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,505 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00132 $0.03505
Opus 5 $0.00066 $0.01752
Sonnet 5 $0.00026 $0.00701
Haiku 4.5 $0.00013 $0.00350

Measured 7d ago against content hash 908f8f7f31df, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

datetime-timezones scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/engineering-core/ours/datetime-timezones/SKILL.md · 326 lines

How it starts

The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DateTime & Timezones Skill — 日期时区处理

何时使用

  • 跨时区业务(用户在不同时区,服务部署在另一个时区)
  • 调度任务 / cron / 报表统计(按"自然日"边界)
  • 调试"为什么少了一小时" / "为什么 3 月 13 日变 2 月 28 日"
  • 数据库存日期 / 时间戳的格式选型
  • 国际化日期格式输出

一、核心概念(永远先理清)

三种时间表达

类型 例子 用途
UTC instant(绝对时刻) 2026-05-06T07:00:00Z 服务器存储 / 跨服务通信
Local DateTime("墙上时间") 2026-05-06 16:00 用户输入 / 显示(带时区上下文)
Zoned DateTime(带时区) 2026-05-06 16:00 Asia/Tokyo 调度 / 跨时区精确锚点

永远存 UTC,显示时按用户时区转换。例外:跨夏令时调度需存 Local + Zone(见后)。

Unix 时间戳

  • 1715000000 —— 绝大多数系统
  • 毫秒1715000000000 —— JS / Java
  • 微秒/纳秒:金融 / 高精度场景

无时区概念(Unix epoch = 1970-01-01 UTC),统一基准。

IANA 时区 ID

Asia/Shanghai
Asia/Tokyo
Asia/Kolkata
America/New_York
America/Los_Angeles
Europe/London
Europe/Paris
Australia/Sydney
UTC

永远不要用 CST / EST / PST —— 含糊(CST = China? 也是 Central Standard Time? 也是 Cuba Standard Time?)。

DST(夏令时)

部分时区每年切换:

  • 美国:3 月第二周日 02:00 → 03:00(春进),11 月第一周日 02:00 → 01:00(秋退)
  • 欧洲:3 月最后周日 / 10 月最后周日
  • 澳洲(南半球):相反方向
  • 中国 / 日本 / 印度 / 大部分非洲无 DST

DST 切换日有"消失的小时"和"重复的小时":

2026-03-08 (US):
  01:30 EST → 03:30 EDT   ← 02:30 不存在
2026-11-01 (US):
  01:30 EDT → 01:30 EST   ← 01:30 重复两次

二、ISO 8601 / RFC 3339

2026-05-06T07:00:00Z          ← UTC(Z = Zulu)
2026-05-06T16:00:00+09:00     ← 带 offset
2026-05-06T16:00:00.123+09:00 ← 毫秒
20260506T070000Z              ← basic 格式(不推荐)

关键+09:00offset 不是 time zone。日本永远 +09:00(无 DST),但纽约可能 -05:00(EST)或 -04:00(EDT)。

三、JavaScript:Temporal API(替代 Date)

// ⚠️ Date 有大量坑:可变、月份从 0 开始、无时区、混淆 instant 和 local
//   → 用 Temporal(Stage 3,2025 部分浏览器原生 + polyfill)

// 1. UTC instant
const now = Temporal.Now.instant()
now.toString()    // '2026-05-06T07:00:00Z'

// 2. Zoned DateTime
const tokyo = Temporal.Now.zonedDateTimeISO('Asia/Tokyo')
tokyo.toString()  // '2026-05-06T16:00:00+09:00[Asia/Tokyo]'

// 3. 转换
const utc = tokyo.toInstant()
const ny = tokyo.withTimeZone('America/New_York')

// 4. 算术
tokyo.add({ days: 7 })
tokyo.subtract({ hours: 3 })
const diff = tokyo.until(other, { largestUnit: 'days' })

// 5. 解析
Temporal.Instant.from('2026-05-06T07:00:00Z')
Temporal.PlainDate.from('2026-05-06')
Temporal.ZonedDateTime.from('2026-05-06T16:00:00[Asia/Tokyo]')

Read the full file on GitHub · 326 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 326 lines · 132 tokens per session scan A 908f8f7f31df

Subscribe to this mod's changes

datetime-timezones is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 2mo ago), licensed MIT. It adds 132 tokens to every session and 3,505 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

chinese-documentation

A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.

jnMetaCode/superpowers-zh · 62 tokens

azure-ai-translation-text-py

Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications. Triggers: "text translation", "translator", "translate text", "transliterate", "TextTranslationClient".

microsoft/skills · 60 tokens

harden

Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.

fengshao1227/ccg-workflow · 62 tokens

seedance-vocab-ja

This skill should be used when the user asks for Japanese Seedance 2.0 prompt wording, Japanese cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into Japanese.

Emily2040/seedance-2.0 · 50 tokens

asc-subscription-localization

Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.

rorkai/app-store-connect-cli-skills · 60 tokens

i18n-helper

A helper for adding internationalization, which lets software show different languages and regional text. It finds user-visible text written directly in code and moves it into language files.

laolaoshiren/claude-code-skills-zh · 33 tokens