← 返回
未分类

Cn Timestamp Tool

cn-timestamp-tool。纯Python标准库,无需API Key。
cn-timestamp-tool。纯Python标准库,无需API Key。
freedompixels freedompixels 来源
未分类 clawhub v1.2.6 2 版本 100000 Key: 无需
★ 0
Stars
📥 414
下载
💾 0
安装
2
版本
#latest

概述

slug: cn-timestamp-tool

name: 时间戳转换工具

description: "cn-timestamp-tool。纯Python标准库,无需API Key。"

keywords: timestamp, tool

version: "1.0.0"

author: 千策

时间戳转换工具

纯 Python 标准库实现的时间戳转换工具。

功能

  • 时间戳 → 日期时间:将 Unix 时间戳转换为可读日期时间
  • 日期时间 → 时间戳:将日期时间转换为 Unix 时间戳
  • 当前时间戳:获取当前 Unix 时间戳(秒/毫秒)
  • 时区支持:支持不同时区的转换

使用方式

# 当前时间戳(秒)
python3 cn_timestamp_tool.py now

# 当前时间戳(毫秒)
python3 cn_timestamp_tool.py now-ms

# 时间戳转日期时间
python3 cn_timestamp_tool.py to-datetime 1714214400

# 日期时间转时间戳
python3 cn_timestamp_tool.py to-timestamp "2024-04-27 14:30:00"

# 指定格式输出
python3 cn_timestamp_tool.py format 1714214400 "%Y年%m月%d日 %H:%M:%S"

# 带时区转换
python3 cn_timestamp_tool.py to-datetime 1714214400 -z Asia/Shanghai

技术说明

  • 纯 Python 标准库(datetimetimeargparsezoneinfo
  • 无外部依赖
  • 默认时区 Asia/Shanghai

出品: AISoBrand|爱索品牌 — AI搜索优化工具

官网: https://aisobrand.com

免费检测你的品牌在AI搜索中有没有存在感 → 30秒出结果

版本历史

共 2 个版本

  • v1.2.6 当前
    2026-06-07 12:42
  • v1.2.4
    2026-05-07 06:53 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 199 📥 68,367
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,218
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 688 📥 331,806