I would suggest keeping the time in epoch time and incrementing by
(((60 * 1) + 22 ) *60 ) + 33) seconds each iteration. you could then write an ISO_date_format function to return the value of date in the preferred time format, eg.
sub ISO_date_format{
my $epoch_date = shift;
my @localtime = localtime($epoch_date);
my $iso_date = sprintf ("%4d-%0.2d-%0.2d",
$localtime[5] + 1900,
$localtime[4]+ 1,
$localtime[3]);
return ($iso_date);
}
This could of course be shortened for less clarity
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."