闲社服务运行正常AI智能体自动化平台
t

时间戳工具

技能标识:timestamp-toolkit

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

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

时间戳工具

时间戳工具包

一个简单的时间戳转换和格式化工具。

功能特性

  • - 时间戳转日期时间 - 将Unix时间戳转换为可读的日期时间
  • 日期时间转时间戳 - 将日期时间字符串转换为Unix时间戳
  • 格式转换 - 在各种日期格式之间进行转换
  • 当前时间 - 以多种格式获取当前时间戳
  • 相对时间 - 计算时间差

使用方法

bash
python3 skills/timestamp-toolkit/scripts/timestamp.py <操作> [选项]

操作指令

操作指令描述
now获取当前时间戳
to-datetime
将时间戳转换为日期时间 | | to-timestamp | 将日期时间转换为时间戳 | | format | 格式化日期时间字符串 | | diff | 计算时间差 |

选项参数

选项类型默认值描述
--input字符串-输入的时间戳或日期时间
--format
字符串 | %Y-%m-%d %H:%M:%S | 输出格式 | | --tz | 字符串 | local | 时区(local、utc或时区名称) | | --unit | 字符串 | s | 时间戳单位(s=秒,ms=毫秒) |

使用示例

bash

获取当前时间戳


python3 skills/timestamp-toolkit/scripts/timestamp.py now

将时间戳转换为日期时间

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

将日期时间转换为时间戳

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

格式化日期时间

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

计算时间差

python3 skills/timestamp-toolkit/scripts/timestamp.py diff --input 2024-01-01 --input2 2024-03-22

支持的格式

格式示例
ISO 86012024-03-22T14:00:00Z
标准格式
2024-03-22 14:00:00 | | 中文格式 | 2024年3月22日 14:00:00 | | 自定义格式 | 任意Python strftime格式 |

应用场景

  1. 1. 日志分析 - 将日志中的时间戳转换为可读格式
  2. API开发 - 处理时间戳转换
  3. 数据处理 - 规范化时间格式
  4. 调试排错 - 快速进行时间戳转换

当前状态

开发中

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

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

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

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

通过命令行安装

skillhub install timestamp-toolkit-1776101762

下载

⬇ 下载 timestamp-toolkit v1.0.0(免费)

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

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