Skip to content

fix: harden t/gh10.t skip logic and update stale docs#135

Draft
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/fix-gh10-flapping-skip
Draft

fix: harden t/gh10.t skip logic and update stale docs#135
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/fix-gh10-flapping-skip

Conversation

@Koan-Bot
Copy link
Copy Markdown

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

What

Fixes a flapping test and updates outdated documentation.

Why

  • GH#99: t/gh10.t can fail on systems where TZ='America/Los_Angeles' doesn't take effect but the host's native timezone has DST active for the test epoch. The skip check only verified the DST flag, not the actual UTC offset.
  • GH#43: The LIMITATION section in Date::Format still claims a 2038 limit, which hasn't been true since Perl 5.12 on 64-bit systems.
  • GH#46: Users are confused by the year-guessing behavior when no year is specified. This was undocumented.

How

  • Added Time::Zone::calc_off() verification to the skip condition — ensures the offset is actually -7h (PDT) before proceeding.
  • Updated Format.pm LIMITATION to mention 64-bit Perl support.
  • Added a MISSING YEAR INFERENCE POD section to Parse.pm documenting the "most recent past" heuristic.

Testing

Full test suite passes. Verified the skip logic correctly skips on a UTC system and proceeds on a system with America/Los_Angeles support.

- t/gh10.t: Also verify UTC offset (-7h for PDT) in skip check, not just
  DST flag. Prevents false-positive test execution on systems where TZ
  assignment fails but the host timezone has DST for the test epoch (GH#99).

- Date::Format POD: Update LIMITATION section to note that 64-bit Perl
  (5.12+) supports dates beyond 2038 (GH#43).

- Date::Parse POD: Add MISSING YEAR INFERENCE section documenting the
  "most recent past" heuristic when year is omitted (GH#46).

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