#!/usr/bin/perl use strict; use warnings; use DateTime; # 1st Jan 2000 my $date = DateTime->new(year => 2000, month => 1, day => 1); # Add a million seconds $date->add(seconds => 1_000_000); # See what you get - 2000-01-12T13:46:40 print $date; #### #!/usr/bin/perl use strict; use warnings; use Time::Local; # Warning: The parameters to timelocal can be a bit confusing # Read the documentation carefully my $date = timelocal(0, 0 , 0, 1, 0, 100); $date += 1_000_000; print scalar localtime $date;