Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

log_format's %{...}t block code renders the month as a number on some Windows systems

Open
#1,853 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
backend

Research direction

The block handler in format_message (lib/Dancer2/Core/Role/Logger.pm, around line 88) passes the caller's format straight to POSIX::strftime. Read the existing $month_name fallback used by the %t/%u path (around line 146) and decide how the %b inside a %{...}t block should use it. Done when log_format: '%{%d/%b/%Y:%H:%M:%S}t %m' yields a month name on a platform that returns a number, and the logger tests still pass.

Written by the indexing model from the issue text.

Description

The %t/%u single-character codes got a fallback for platforms whose strftime %b returns the month as a number (#1845), but the %{...}t block code does not use it, so an Apache-style format still logs the number:

logger: "file"
log_format: '%{%d/%b/%Y:%H:%M:%S}t %m'

On the machines in the cpantesters report this gives 29/9/2026:23:59:25 where it should give 29/Sep/2026:23:59:25.

format_message's $block_handler hands the caller's format string straight to POSIX::strftime (lib/Dancer2/Core/Role/Logger.pm:88), which is right for the format as a whole but leaves %b on a platform that cannot render it as a name. The %b in the block could go through the same $month_name helper the %t/%u path now uses (lib/Dancer2/Core/Role/Logger.pm:146) before the string reaches strftime; where the platform does return a name that helper returns exactly what strftime would, so nothing changes there.

Not covered by #1845 because it changes a code path where the format is the caller's own; split out on review. Full suite passes without it.

Dominant language
Perl
Stars
604
Forks
287
Avg merge
1d 9h
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerlDancer/Dancer2

All issues in PerlDancer/Dancer2

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.