Closed scottchiefbaker closed 2 years ago
This: Time::Piece->new()->strftime('%a, %d %b %Y %I:%M:%S %p %Z');
right now returns:
Mon, 18 Jul 2022 08:50:06 PM CDT
Does that work?
Yes that does work. I don't know why I didn't even think about strftime()
:)
Probably cuz the majority of the man page is dedicated to the built in format options.
Yea, docs aren't the best, sorry.
Time::Piece
lacks any way to get the hour in a twelve hour format (only 24 hour is supported). This would be a much welcome addition to my American brain. Something like$t->hour12
. This would require an option for AM/PM to go with it$t->ampm
.Ideally a method like
$t->hms
with a twelve hour variant would be very helpful. Perhaps something like$t->hms12
which would return something like:2:48:28 PM