← Back to Skills Marketplace
terrycarter1985

Epoch Time Converter

by terrycarter1985 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ Security Clean
44
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install epoch-time-converter
Description
Convert between Unix epoch timestamps (seconds or milliseconds) and human-readable date strings in any IANA timezone. Use when the user provides a number tha...
README (SKILL.md)

Epoch Time Converter

Overview

Two-way conversion between Unix epoch timestamps and human-readable datetimes, with explicit timezone handling. Backed by a single self-contained Python script that uses only the standard library (datetime, zoneinfo).

Quick start

# Epoch seconds -> human time in a given timezone
python3 scripts/epoch.py to-date 1700000000 --tz Asia/Shanghai
# -> 2023-11-15 06:13:20 +08:00 (Asia/Shanghai)

# Epoch milliseconds -> human time
python3 scripts/epoch.py to-date 1700000000000 --unit ms --tz UTC

# Human time -> epoch seconds (input timezone is required)
python3 scripts/epoch.py to-epoch "2023-11-15 06:13:20" --tz Asia/Shanghai
# -> 1700000000

# Human time -> epoch milliseconds
python3 scripts/epoch.py to-epoch "2023-11-15T06:13:20" --tz Asia/Shanghai --unit ms

Decision tree

  1. Input is purely numeric → use to-date.
    • 10 digits → --unit s (default).
    • 13 digits → --unit ms.
  2. Input looks like a date/time string → use to-epoch and require --tz.
  3. If the user did not specify a timezone for to-date, default to UTC and explicitly tell them which timezone you used.

Output format

Both subcommands print one line: \x3Cvalue> (\x3Ccontext>). Always echo this raw output back to the user, then add a one-line plain-language summary.

Edge cases to watch

  • Bare numbers without a unit hint: prefer length-based detection (10 vs 13 digits) over guessing.
  • Strings without timezone offsets (e.g. 2024-01-01 09:00) are interpreted in the --tz value; do not silently fall back to system local time.
  • Negative epoch values (pre-1970) are supported.

Resources

scripts/

  • epoch.py — CLI implementing to-date and to-epoch. Pure stdlib; runs on any Python 3.9+.
Usage Guidance
Installers should understand that the skill runs a local Python script to convert timestamps and dates. Confirm the intended timezone and whether the timestamp is in seconds or milliseconds, but there is no artifact-backed security concern beyond normal local script execution.
Capability Assessment
Purpose & Capability
The artifacts consistently describe and implement Unix epoch/date conversion with timezone handling using a single Python standard-library CLI.
Instruction Scope
Runtime instructions are limited to choosing conversion direction, timezone, seconds versus milliseconds, and echoing the CLI result; no unrelated agent behavior or prompt manipulation is present.
Install Mechanism
No package dependencies, install hooks, or external downloads are declared; the only executable artifact is the disclosed conversion script.
Credentials
The script uses argparse, datetime, sys, and zoneinfo only, which is proportionate for local timestamp conversion and does not access files, network, credentials, or private data.
Persistence & Privilege
No persistence, background execution, privilege escalation, credential/session use, or mutation of user data is present.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install epoch-time-converter
  3. After installation, invoke the skill by name or use /epoch-time-converter
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release: bidirectional Unix epoch <-> datetime conversion with IANA timezone support and a self-contained Python CLI.
Metadata
Slug epoch-time-converter
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Epoch Time Converter?

Convert between Unix epoch timestamps (seconds or milliseconds) and human-readable date strings in any IANA timezone. Use when the user provides a number tha... It is an AI Agent Skill for Claude Code / OpenClaw, with 44 downloads so far.

How do I install Epoch Time Converter?

Run "/install epoch-time-converter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Epoch Time Converter free?

Yes, Epoch Time Converter is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Epoch Time Converter support?

Epoch Time Converter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Epoch Time Converter?

It is built and maintained by terrycarter1985 (@terrycarter1985); the current version is v0.1.0.

💬 Comments