summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
authorAnthony Heading <anthony@ajrh.net>2014-08-28 19:10:06 -0400
committerJames E Keenan <jkeenan@cpan.org>2014-09-03 07:46:20 -0400
commit648eb45f2e489e7cbdab09c65bccaac4a78ae3ee (patch)
treebf129361325feef21bc0871d9a2d574a9531e42d /make_ext.pl
parenteaff586aa6444fb20654ed863b7ff35e136737e8 (diff)
downloadperl-648eb45f2e489e7cbdab09c65bccaac4a78ae3ee.tar.gz
stat Makefile.PL to get values for utime.
On certain machines, the file system timestamps are in local time, so assigning a timestamp based on a time() call is prone to jump timezones to UTC. Anthony Heading is now a Perl 5 author. For: RT #122609
Diffstat (limited to 'make_ext.pl')
-rw-r--r--make_ext.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/make_ext.pl b/make_ext.pl
index a67e894ef6..29e88a933f 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -445,8 +445,8 @@ EOM
# the Makefile.PL. Altering the atime and mtime backwards by 4
# seconds seems to resolve the issue.
eval {
- my $ftime = time - 4;
- utime $ftime, $ftime, 'Makefile.PL';
+ my $ftime = (stat('Makefile.PL'))[9] - 4;
+ utime $ftime, $ftime, 'Makefile.PL';
};
} elsif ($mname =~ /\A(?:Carp
|ExtUtils::CBuilder