← 返回
效率工具 中文

system-time

Get accurate system time in various formats and timezones. Use when the user needs to know the current time, date, timestamp, or wants to convert between tim...
获取精确的系统时间,支持多种格式和时区。当用户需要查看当前时间、日期、时间戳或进行时区转换时使用。
xiaoxianceng874-cyber
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 502
下载
💾 1
安装
1
版本
#latest

概述

System Time

Get accurate system time information in multiple formats.

Quick Usage

Current Time (Local)

date                                    # Human readable
date -Iseconds                          # ISO 8601 with seconds
date +%s                                # Unix timestamp

Current Time (UTC)

date -u                                 # UTC human readable
date -u -Iseconds                       # UTC ISO 8601
date -u +%s                             # UTC Unix timestamp (same as local)

Specific Timezone

TZ=Asia/Shanghai date                   # Shanghai time
TZ=America/New_York date                # New York time
TZ=Europe/London date                   # London time

Common Formats

FormatCommandExample Output
---------------------------------
ISO 8601date -Iseconds2024-03-11T16:30:00+08:00
Unix timestampdate +%s1710145800
RFC 2822date -RMon, 11 Mar 2024 16:30:00 +0800
Customdate "+%Y-%m-%d %H:%M:%S"2024-03-11 16:30:00

Timezone Conversion

Convert from one timezone to another:

# Convert specific time from Shanghai to New York
TZ=America/New_York date -d "2024-03-11 16:30:00 CST"

# List available timezones
ls /usr/share/zoneinfo/

Python Alternative (for scripting)

from datetime import datetime, timezone

# Current UTC time
utc_now = datetime.now(timezone.utc)
print(utc_now.isoformat())

# Current local time
local_now = datetime.now()
print(local_now.isoformat())

# Unix timestamp
print(int(utc_now.timestamp()))

Notes

  • Unix timestamp is always UTC (timezone-independent)
  • ISO 8601 format includes timezone offset
  • Use timedatectl on Linux systems for system clock info

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 07:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 432 📥 103,815
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 446 📥 226,382
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 147,888