Skip to content

Conversation

@mknos
Copy link
Contributor

@mknos mknos commented Mar 14, 2025

  • I was tracking why the Perl date command separated Mar and 14 with 2 spaces instead of one
  • The default strftime() format string is "%a %b %e %T %Z %Y"
  • The Linux manual for strftime() says %e is the same as %d, except that a leading zero is replaced with a leading space
  • So day 1 would be "01" and " 1", but day 10 would have no leading space or zero
  • Formatting the day number with "%2d" is good enough for %e specifier; previously day 14 was formatted as " 14" in setup_specifiers()
%perl date # with patch
Fri Mar 14 09:11:30 AWST 2025
%date # GNU
Fri Mar 14 09:11:31 AM AWST 2025

* I was tracking why the Perl date command separated Mar and 14 with 2 spaces instead of one
* The default strftime() format string is "%a %b %e %T %Z %Y"
* The Linux manual for strftime() says %e is the same as %d, except that a leading zero is replaced with a leading space
* So day 1 would be "01" and " 1", but day 10 would have no leading space/zero
* Formatting the day number with "%2d" is good enough for %e specifier; previously day 14 was formatted as " 14" in setup_specifiers()

%perl date # with patch
Fri Mar 14 09:11:30 AWST 2025
%date # GNU
Fri Mar 14 09:11:31 AM AWST 2025
@mknos mknos had a problem deploying to automated_testing March 14, 2025 01:42 — with GitHub Actions Failure
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing March 14, 2025 01:42 — with GitHub Actions Inactive
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: date The date program Status: needs verification issue needs to be verified Type: bug an existing feature does not work labels Mar 14, 2025
@coveralls
Copy link

coveralls commented Mar 14, 2025

Pull Request Test Coverage Report for Build 13848121532

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 70.088%

Totals Coverage Status
Change from base Build 13705860124: 0.0%
Covered Lines: 396
Relevant Lines: 565

💛 - Coveralls


sub setup_specifiers {
my %specifiers = (
'e' => sprintf( '% 2d', (core_time)[3] ),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I did not know the space acted like that, but looking at the docs, that's what it does.

@briandfoy
Copy link
Owner

changes: don't prepend space to the day of the month

@briandfoy briandfoy merged commit 17c8f78 into briandfoy:master Mar 14, 2025
22 of 24 checks passed
@github-actions github-actions bot added Status: accepted The fix is accepted and removed Status: needs verification issue needs to be verified Priority: low get to this whenever labels Mar 14, 2025
@briandfoy briandfoy removed the Type: enhancement improve a feature that already exists label Mar 14, 2025
@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Program: date The date program Status: released there is a new release with this fix Type: bug an existing feature does not work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants