my $dt = DateTime->new( year => 2021, month => 4, day => 5, hour => 2, time_zone => 'Africa/Nairobi', ); # or, create a DateTime object from an ISO timestring my $isostr = '2021-10-11T11:13:57'; my $dt = DateTime::Format::ISO8601->parse_datetime($isostr); # add a second to what $dt currently holds $dt->add(seconds => 1);