Hi! I pass the value "1974-01-01 00:00:00" and expect the correct result to be "126219600". But actually I get the value "3281990400" which corresponds to "2074-01-01". The same behavior for older years, for example 1973, 1972, etc.
use Date::Format;
use Date::Parse;
use Data::Dumper;
my $date = '1974-01-01 00:00:00';
warn Dumper ($date);
# $VAR1 = '1974-01-01 00:00:00';
my $date_from = str2time($date);
warn Dumper ($date_from);
# $VAR1 = 3281990400;
warn Dumper (time2str("%Y-%m-%d", $date_from));
# $VAR1 = '2074-01-01';
Hi! I pass the value "1974-01-01 00:00:00" and expect the correct result to be "126219600". But actually I get the value "3281990400" which corresponds to "2074-01-01". The same behavior for older years, for example 1973, 1972, etc.