Skip to content

feat: add 13 commonly-used timezone abbreviations#130

Draft
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/add-missing-timezone-abbreviations
Draft

feat: add 13 commonly-used timezone abbreviations#130
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/add-missing-timezone-abbreviations

Conversation

@Koan-Bot
Copy link
Copy Markdown

@Koan-Bot Koan-Bot commented May 1, 2026

What

Adds 13 timezone abbreviations to Time::Zone that are commonly used in real-world date strings.

Why

Dates using these timezone abbreviations (e.g., "Thu Apr 24 10:30:00 ACST 2025") caused str2time() to return undef because the abbreviations weren't in Time::Zone's lookup tables. These timezones cover Australia (Central/Western), Africa (South African, East Africa), Middle East (Turkey, Iran, Afghanistan), and South Asia (Pakistan, Nepal) — regions with significant populations whose date formats were unsupported.

How

Added entries to @Zone (9 standard) and @dstZone (4 daylight) in Time::Zone.pm, maintaining offset order. Each abbreviation maps to its IANA-standard UTC offset. Also uncommented/replaced the old CAST/CADT commented entries with their modern ACST/ACDT forms.

Testing

  • 16 new tests in t/zone.t verify each abbreviation resolves to the correct offset
  • Verified Date::Parse integration: str2time() now successfully parses dates with all 13 new timezone abbreviations
  • Full test suite passes

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 36 insertions(+), 3 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Add timezone abbreviations that are widely used in real-world date
strings but were missing from Time::Zone, causing str2time() to
return undef:

Standard zones:
- ACST (Australian Central Standard, UTC+9:30)
- AWST (Australian Western Standard, UTC+8, alias for WST)
- SAST (South African Standard, UTC+2)
- EAT (East Africa, UTC+3)
- TRT (Turkey, UTC+3)
- IRST (Iran Standard, UTC+3:30)
- AFT (Afghanistan, UTC+4:30)
- PKT (Pakistan Standard, UTC+5)
- NPT (Nepal, UTC+5:45)

Daylight zones:
- ACDT (Australian Central Daylight, UTC+10:30)
- AWDT (Australian Western Daylight, UTC+9)
- WEST (Western European Summer, UTC+1)
- IRDT (Iran Daylight, UTC+4:30)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant