Refined Time Preset
Production-ready setting that handles status, line, timestamp, showing. Includes structured workflows, validation checks, and reusable patterns for statusline.
Refined Time Preset
Clean time-focused statusline showing formatted timestamps, session duration, timezone, and elapsed working time.
When to Use This Setting
Apply this setting when you need to:
- Keep precise track of session duration and elapsed working time directly in your Claude Code statusline
- Display timezone-aware timestamps for remote team coordination across multiple time zones
- Maintain a simple, clock-focused statusline without project or git metadata clutter Consider alternatives when:
- Your operating system or window manager already provides prominent clock displays
- You need project-specific context like git branch or build status more than time information
Quick Start
Configuration
name: refined-time-preset type: setting category: statusline
Example Application
claude setting:apply refined-time-preset
Example Output
Setting applied. Changes:
- statusLine.type: command
- statusLine.command: bash time-display inline
- time_format: HH:MM:SS with timezone abbreviation
- session_tracking: elapsed since session start
- timezone_display: system TZ abbreviation
Core Concepts
Time Display Overview
| Aspect | Details |
|---|---|
| Current Time | System time formatted in HH:MM:SS with configurable format string |
| Timezone Label | Displays the active timezone abbreviation from system settings |
| Session Duration | Calculates elapsed time since the session cache file was first created |
| Date Display | Optional date field showing YYYY-MM-DD for cross-day session awareness |
| Model Context | Includes Claude model name for session identification alongside time data |
Time Tracking Architecture
+-------------------+ +---------------------+ +------------------+
| System Clock |---->| Time Formatter |---->| TZ Resolver |
| date command | | HH:MM:SS format | | system timezone |
+-------------------+ +---------------------+ +------------------+
| |
v v
+---------------------+ +------------------+
| Session Timer | | Status Assembler |
| now - start_time |--->| time+tz+session |
| from cache file | | duration display |
+---------------------+ +------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| time_format | string | "%H:%M:%S" | Format string passed to the date command for time display |
| show_timezone | boolean | true | Include the timezone abbreviation in the statusline output |
| show_session_duration | boolean | true | Track and display elapsed time since session start |
| show_date | boolean | false | Include the current date in YYYY-MM-DD format |
| cache_directory | string | "/tmp" | Directory for storing the session start timestamp file |
Best Practices
- Use for cross-timezone team coordination - When working with distributed teams, the timezone label helps colleagues quickly understand your local time context during screen shares or pair programming sessions.
- Enable date display for overnight sessions - If you frequently code past midnight, enable show_date so you can see when the calendar day has changed without checking your system clock.
- Track session duration for time management - The elapsed session timer provides a passive time awareness tool. Set personal rules like taking a break after 90 minutes of continuous session time.
- Customize format for locale preferences - Switch to 12-hour format with AM/PM notation if you prefer it, or use compact military-style time display to save statusline space.
- Combine with deadline countdown - The refined time preset pairs well with the deadline countdown statusline. Use time preset for general awareness and switch to deadline countdown when approaching specific delivery deadlines.
Common Issues
- Session duration shows 0 minutes continuously - The session start cache file may be recreated on every refresh instead of only on first creation. Ensure the script checks for file existence before writing the start timestamp.
- Timezone shows UTC instead of local - The TZ environment variable may not be set in the shell that runs the statusline command. Export your timezone explicitly in your shell profile or pass it as a parameter.
- Time format shows raw format string - The date command syntax varies between GNU coreutils (Linux) and BSD (macOS). Verify your format string is compatible with your operating system date implementation.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Project Standards Config
Claude Code settings preset that enforces consistent coding standards. Configures TypeScript strict mode, ESLint rules, Prettier formatting, and naming conventions.
Bedrock Configuration Blueprint
All-in-one setting covering configure, claude, code, amazon. Includes structured workflows, validation checks, and reusable patterns for api.
Refined Corporate Preset
Production-ready setting that handles configure, proxy, settings, corporate. Includes structured workflows, validation checks, and reusable patterns for api.