log_format's %{...}t block code renders the month as a number on some Windows systems
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PerlDancer/Dancer2
-
Add .gitattributes so share/skel keeps LF on a Windows git checkoutPossibly taken @sadhana-s-codez claimed this 1 day ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
PerlDancer/Dancer2#1854 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
PerlDancer/Dancer2#1851 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PerlDancer/Dancer2#1850 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
PerlDancer/Dancer2#1820 ·
Maintainers usually reply within 1 day
-
Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
PerlDancer/Dancer2#1819 ·
Maintainers usually reply within 1 day
All issues in PerlDancer/Dancer2
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
major/MySQLTuner-perl#1007 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
bioconda/bioconda-recipes#70187 ·
Maintainers usually reply within 2 days
-
documentation Needs Triage
Difficulty 1/5 Under an hour Newbie friendliness 93/100
Maintainers usually reply within 1 day