in reply to Time::Piece and localtime?

If you don't supply the timezone to strptime, it uses UTC. localtime always knows its timezone, though. One of the ways how to construct the object in the current zone is to use localtime to construct the object instead of the class:
$date1 = localtime->strptime($date1, $dateformat);

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Time::Piece and localtime?
by slugger415 (Monk) on Sep 16, 2022 at 17:30 UTC

    that worked, thank you!