Skip to main content
subagent CX Codex

get-current-datetime — Claude Code subagent: date and time

get-current-datetime — a subagent that runs the date command with a specified timezone and returns only the raw output. Use it when you need the current date and time in a prompt without extra commentary.

MIT ★ 2,744 updated 2026-10-08

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/get-current-datetime.md
Open on GitHub

What get-current-datetime does

The subagent executes TZ='Australia/Brisbane' date and outputs the result exactly as the system returns it—no formatting, headers, or explanations. You can add date flags for different formats: +"%Y-%m-%d_%H%M%S" for filenames, +"%Y-%m-%d %H:%M:%S %Z" for human-readable output, or +"%Y-%m-%dT%H:%M:%S%z" for ISO format.

It uses Bash, Read, and Write tools internally. The subagent does not spawn parallel processes and adds no explanatory text—only the command output.

What it helps with

  • Get the current time in a specific timezone
  • Embed the date in a filename or report
  • Add a timestamp to a log or result
  • Output time in ISO format for script parsing

Example prompts for the agent

  • What's the current date and time in Brisbane?
  • Create a filename with today's date and current time
  • Add the current timestamp in ISO format to the report

How to install get-current-datetime

Manually: put the files in place

.claude/agents/get-current-datetime.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about get-current-datetime

How do I install get-current-datetime in Claude Code?

Create a file .claude/agents/get-current-datetime.md at the project root with the subagent definition. Claude Code will auto-detect and load it.

What does get-current-datetime do?

It runs date with the Australia/Brisbane timezone and returns only the output, with no formatting or explanatory text.

How can I get the date in a different format?

Specify the format in your request—for example, "Show the date in ISO format" will add +"%Y-%m-%dT%H:%M:%S%z" to the date command.

Source text

get-current-datetime.md · MIT
---
name: get-current-datetime
description: Execute TZ='Australia/Brisbane' date command and return ONLY the raw output. No formatting, headers, explanations, or parallel agents.
tools: Bash, Read, Write
color: cyan
---

Execute `TZ='Australia/Brisbane' date` and return ONLY the command output.

```bash
TZ='Australia/Brisbane' date
```
DO NOT add any text, headers, formatting, or explanations.
DO NOT add markdown formatting or code blocks.
DO NOT add "Current date and time is:" or similar phrases.
DO NOT use parallel agents.

Just return the raw bash command output exactly as it appears.

Example response: `Mon 28 Jul 2025 23:59:42 AEST`

Format options if requested:
- Filename: Add `+"%Y-%m-%d_%H%M%S"`
- Readable: Add `+"%Y-%m-%d %H:%M:%S %Z"`
- ISO: Add `+"%Y-%m-%dT%H:%M:%S%z"`

© centminmod · MIT · centminmod/my-claude-code-setup

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set35

The whole set →
10_instruction_stress 10_instruction_stress is a Claude Code prompt that tests whether a model follows four simultaneous constraints while describing an imaginary coffee shop. GP ChatGPT ★ 2,744repo stars 05_tool_heavy_task The 05_tool_heavy_task prompt has Claude Code read three files one at a time, then sum up Meridian’s testing strategy in a single paragraph. It also tests whether the agent makes separate tool calls. GP ChatGPT ★ 2,744repo stars codex-cli Calls OpenAI Codex CLI from inside Claude Code. Handy when you want a GPT-5.2 take on code without switching tools. CX Codex ★ 2,744repo stars zai-cli Routes code analysis requests to the GLM 4.7 model via the z.ai CLI directly from your Claude Code workflow. CX Codex ★ 2,744repo stars 09_typescript_refactor 09_typescript_refactor is a Claude Code prompt that makes TypeScript functions easier to read. It asks for a code block and a short explanation. GP ChatGPT ★ 2,744repo stars 02_english_prose 02_english_prose rewrites an English paragraph to remove every comma. You can restructure sentences and use other punctuation while preserving the meaning. GP ChatGPT ★ 2,744repo stars 08_csv_transform 08_csv_transform aggregates tabular order entries into customer spending totals and returns raw CSV without conversational filler. GP ChatGPT ★ 2,744repo stars 04_stack_trace_debug The 04_stack_trace_debug prompt asks Claude Code to find the cause of a Python stack trace, identify the failing call, and suggest a fix. Use it when you need a compact diagnosis. GP ChatGPT ★ 2,744repo stars

Project sponsors

Companies that keep this analytics open