Skip to content

feat: add configurable timezone support#11

Merged
ralsina merged 1 commit intomainfrom
timezone
Nov 17, 2025
Merged

feat: add configurable timezone support#11
ralsina merged 1 commit intomainfrom
timezone

Conversation

@ralsina
Copy link
Copy Markdown
Owner

@ralsina ralsina commented Nov 17, 2025

Summary

Add timezone configuration to address issue #10 where timestamps were displayed in UTC requiring mental math conversion.

Features

  • Command line option: --timezone with IANA names and GMT offsets support
  • Environment variable: GRAFITO_TIMEZONE for configuration
  • Default to local timezone for better user experience
  • IANA timezone names: America/New_York, Europe/London, etc.
  • GMT offsets: GMT+5, GMT-3:30 with minutes support
  • Graceful fallback for invalid timezones with warning logs
  • Timezone-aware timestamp formatting in log display

Usage Examples

# Command line
./bin/grafito --timezone America/New_York
./bin/grafito --timezone GMT+5

# Environment variable
export GRAFITO_TIMEZONE="Europe/London"
./bin/grafito

# systemd service
Environment="GRAFITO_TIMEZONE=America/New_York"

Test Plan

  • All existing tests pass (75 specs)
  • Added 7 new timezone-specific tests
  • Build succeeds without errors
  • Linting passes with Ameba
  • Manual testing with various timezone formats
  • Graceful fallback for invalid timezones
  • Default behavior uses local timezone

Closes #10

Add timezone configuration to address issue #10 where timestamps were displayed in UTC requiring mental math conversion.

Features:
- Command line option: --timezone with IANA names and GMT offsets support
- Environment variable: GRAFITO_TIMEZONE for configuration
- Default to local timezone for better user experience
- Support for IANA timezone names (America/New_York, Europe/London)
- Support for GMT offsets (GMT+5, GMT-3:30) with minutes
- Graceful fallback for invalid timezones with warning logs
- Timezone-aware timestamp formatting in log display

Closes #10

🤖 Generated with LGM 4.5 from z.ai

Co-Authored-By: Claude <noreply@anthropic.com>
@ralsina ralsina merged commit b397107 into main Nov 17, 2025
1 check passed
@ralsina ralsina deleted the timezone branch November 17, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timezone used by Grafito

1 participant