summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2022-01-05 17:25:02 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2022-01-06 10:37:49 +0100
commitce2f4b6b1705526b3862b2f137dfcac0ad2cb558 (patch)
tree6756863afc7082861fb199d03c1ecc41069b3e4f /util
parent7a30610902d6d19cfd1698498d3d4129f308e285 (diff)
Fix copyright year issues
Fixes: #13765 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17427) (cherry picked from commit fd84b9c3e94be1771d1b34ad857081f7693318aa)
Diffstat (limited to 'util')
-rw-r--r--util/perl/OpenSSL/copyright.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/perl/OpenSSL/copyright.pm b/util/perl/OpenSSL/copyright.pm
index 1fd9f353f7..b82b67a0e6 100644
--- a/util/perl/OpenSSL/copyright.pm
+++ b/util/perl/OpenSSL/copyright.pm
@@ -23,11 +23,11 @@ sub year_of {
# See if git's available
open my $FH,
- "git log -1 --date=format:%Y --format=format:%ad $file 2>/dev/null|"
+ "git log -1 --date=short --format=format:%cd $file 2>/dev/null|"
or return $YEAR;
my $LINE = <$FH>;
close $FH;
- chomp($LINE);
+ $LINE =~ s/^([0-9]*)-.*/$1/;
$YEAR = $LINE if $LINE;
return $YEAR;
}