Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: change hour in timestamp

by Anonymous Monk
on Jun 05, 2022 at 09:26 UTC ( [id://11144406]=note: print w/replies, xml ) Need Help??


in reply to change hour in timestamp

Thank you for all the interesting answers. Another easy approach to achieve my OP:

use strict; use warnings; use Time::Piece; my $date = "Sat Jun 4 22:47:31 2022 +0200"; my $fmt = '%a %b %d %T %Y %z'; my $tp = Time::Piece->strptime($date, $fmt); print $tp;

I agree with the mention that I should work with timezone though.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11144406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-28 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found