Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-Format-Strptime CPAN distribution.

Report information
The Basics
Id: 75498
Status: resolved
Priority: 0/
Queue: DateTime-Format-Strptime

Owner: Nobody in particular
Requestors: MARKLE [...]

Bug Information
Severity: Unimportant
Broken in:
  • 1.4000
  • 1.5000
Fixed in: (no value)

Subject: documentation - do %m, %d, %H, %M pad w/ leading 0's in format_datetime()?
Download (untitled) / with headers
text/plain 325b
%T and %F pad zeros in format_datetime(). Do %m, %d, %H, %M do the same when used individually in a format string? Documentation is technically incorrect-- "The hour (0āˆ’23)" s/b "The hour (00āˆ’23)" etc. ... with the caveat that they will parse unpadded numbers in parse_datetime(). Thanks, keep up the good work. -Mark
Download (untitled) / with headers
text/plain 376b
BASH% cat ~/ #!/usr/bin/perl use strict; use warnings FATAL => 'all'; use DateTime; use DateTime::Format::Strptime; my $fmt = DateTime::Format::Strptime->new( pattern => '%Y %m %d %H %M %S', ); my $dt = DateTime->now(); print $fmt->format_datetime($dt), "\n"; {2012-03-02 20:08:20 PST -0800} BASH% ~/ 2012 03 03 04 08 23 {2012-03-02 20:08:23 PST -0800}

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to