Peter Squentz: Datum?

Beitrag lesen

("%02d:%02d:%02d",$hour,$min,$sec);

$year += 1900;  <-- bzw 2000 dann ab dem 1.1!

Falsch auch im Jahr 2000 addiert man nur 1900 dazu! "perldoc -f localtime" sagt dazu:

Also, C<$year> is the
number of years since 1900, that is, C<$year> is C<123> in year 2023,
and I<not> simply the last two digits of the year.

cu,
Peter