← 返回
未分类 中文

Timestamp Toolkit

Timestamp conversion tool. Convert between Unix timestamp, datetime, and various date formats.
时间戳转换工具:在 Unix 时间戳、日期时间和各种日期格式之间进行转换。
freeter226
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 384
下载
💾 3
安装
1
版本
#latest

概述

Timestamp Toolkit

A simple timestamp conversion and formatting tool.

Features

  • Timestamp to DateTime - Convert Unix timestamp to readable datetime
  • DateTime to Timestamp - Convert datetime string to Unix timestamp
  • Format Conversion - Convert between various date formats
  • Current Time - Get current timestamp in multiple formats
  • Relative Time - Calculate time differences

Usage

python3 skills/timestamp-toolkit/scripts/timestamp.py <action> [options]

Actions

ActionDescription
---------------------
nowGet current timestamp
to-datetimeConvert timestamp to datetime
to-timestampConvert datetime to timestamp
formatFormat datetime string
diffCalculate time difference

Options

OptionTypeDefaultDescription
------------------------------------
--inputstring-Input timestamp or datetime
--formatstring%Y-%m-%d %H:%M:%SOutput format
--tzstringlocalTimezone (local, utc, or timezone name)
--unitstringsTimestamp unit (s=seconds, ms=milliseconds)

Examples

# Get current timestamp
python3 skills/timestamp-toolkit/scripts/timestamp.py now

# Convert timestamp to datetime
python3 skills/timestamp-toolkit/scripts/timestamp.py to-datetime --input 1700000000

# Convert datetime to timestamp
python3 skills/timestamp-toolkit/scripts/timestamp.py to-timestamp --input "2024-03-22 14:00:00"

# Format datetime
python3 skills/timestamp-toolkit/scripts/timestamp.py format --input "2024-03-22" --format "%Y年%m月%d日"

# Calculate time difference
python3 skills/timestamp-toolkit/scripts/timestamp.py diff --input "2024-01-01" --input2 "2024-03-22"

Supported Formats

FormatExample
-----------------
ISO 86012024-03-22T14:00:00Z
Standard2024-03-22 14:00:00
Chinese2024年3月22日 14:00:00
CustomAny Python strftime format

Use Cases

  1. Log Analysis - Convert timestamps in logs to readable format
  2. API Development - Handle timestamp conversions
  3. Data Processing - Normalize time formats
  4. Debugging - Quick timestamp conversions

Current Status

In development.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 05:45 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

JSON Wizard

freeter226
JSON格式化、验证及转换工具。支持格式化、压缩、校验JSON,以及JSON与YAML互转。
★ 0 📥 424

URL Toolkit

freeter226
URL编码解码、参数解析及URL操作开发者工具包
★ 0 📥 475

Skill Radar

freeter226
扫描、分析并优化AI技能生态系统;在一条命令中诊断使用情况、发现能力缺口并检查版本更新;触发于 "sk...
★ 0 📥 454