返回顶部
t

timestamp-toolkit

Timestamp conversion tool. Convert between Unix timestamp, datetime, and various date formats.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
95
下载量
0
收藏
概述
安装方式
版本历史

timestamp-toolkit

# 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 ```bash python3 skills/timestamp-toolkit/scripts/timestamp.py <action> [options] ``` ## Actions | Action | Description | |--------|-------------| | `now` | Get current timestamp | | `to-datetime` | Convert timestamp to datetime | | `to-timestamp` | Convert datetime to timestamp | | `format` | Format datetime string | | `diff` | Calculate time difference | ## Options | Option | Type | Default | Description | |--------|------|---------|-------------| | `--input` | string | - | Input timestamp or datetime | | `--format` | string | %Y-%m-%d %H:%M:%S | Output format | | `--tz` | string | local | Timezone (local, utc, or timezone name) | | `--unit` | string | s | Timestamp unit (s=seconds, ms=milliseconds) | ## Examples ```bash # 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 | Format | Example | |--------|---------| | ISO 8601 | 2024-03-22T14:00:00Z | | Standard | 2024-03-22 14:00:00 | | Chinese | 2024年3月22日 14:00:00 | | Custom | Any 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.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 timestamp-toolkit-1776101762 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 timestamp-toolkit-1776101762 技能

通过命令行安装

skillhub install timestamp-toolkit-1776101762

下载 Zip 包

⬇ 下载 timestamp-toolkit v1.0.0

文件大小: 4.01 KB | 发布时间: 2026-4-14 13:12

v1.0.0 最新 2026-4-14 13:12
首个版本

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部