AgentSkillsCN

get-current-time

以多种格式与时区获取当前日期与时间。当用户询问“现在几点?”“今天是什么日期?”“[时区]的当前时间”或其他关于当前时间/日期的信息时,可使用此功能。

SKILL.md
--- frontmatter
name: get-current-time
description: Get the current date and time in various formats and timezones. Use when the user asks "What time is it?", "What's the date today?", "Current time in [timezone]", or any request for current time/date information.

Get Current Time

Overview

Retrieves the current date and time with support for multiple formats, timezones, and locale-specific output.

Quick Start

Get current time in default format (ISO 8601):

bash
python3 get-current-time/scripts/get_time.py

Get time in a specific format:

bash
python3 get-current-time/scripts/get_time.py --format "%Y-%m-%d %H:%M:%S"

Get time in a specific timezone:

bash
python3 get-current-time/scripts/get_time.py --timezone "Asia/Shanghai"

Available Formats

FormatDescriptionExample
isoISO 8601 format (default)2025-01-15T14:30:00+08:00
dateDate only2025-01-15
timeTime only14:30:00
fullFull readable formatWednesday, January 15, 2025 at 2:30 PM
timestampUnix timestamp1736927400

Common Timezones

  • Asia/Shanghai - China Standard Time
  • America/New_York - Eastern Time
  • America/Los_Angeles - Pacific Time
  • Europe/London - GMT/BST
  • Asia/Tokyo - Japan Standard Time
  • UTC - Coordinated Universal Time

Resources

scripts/get_time.py

Main script for retrieving current time. Supports custom formats and timezones via command-line arguments.