File fix-time-local.patch of Package perl-Parse-Win32Registry
Date: 2018-02-21
Author: Bernhard M. Wiedemann <bwiedemann suse de>
https://rt.cpan.org/Public/Bug/Display.html?id=124514
Index: Parse-Win32Registry-1.0/lib/Parse/Win32Registry/Base.pm
===================================================================
--- Parse-Win32Registry-1.0.orig/lib/Parse/Win32Registry/Base.pm
+++ Parse-Win32Registry-1.0/lib/Parse/Win32Registry/Base.pm
@@ -167,7 +167,7 @@ sub unpack_windows_time {
# adjust the UNIX epoch time to the local OS's epoch time
# (see perlport's Time and Date section)
- my $epoch_offset = timegm(0, 0, 0, 1, 0, 70);
+ my $epoch_offset = timegm(0, 0, 0, 1, 0, 1970);
$epoch_time += $epoch_offset;
if ($epoch_time < 0 || $epoch_time > 0x7fffffff) {
Index: Parse-Win32Registry-1.0/t/misc.t
===================================================================
--- Parse-Win32Registry-1.0.orig/t/misc.t
+++ Parse-Win32Registry-1.0/t/misc.t
@@ -502,7 +502,7 @@ foreach my $time_test (@time_tests) {
if (defined($time)) {
# The test data time is a Unix epoch time
# so is adjusted to the local OS's epoch time
- my $epoch_offset = timegm(0, 0, 0, 1, 0, 70);
+ my $epoch_offset = timegm(0, 0, 0, 1, 0, 1970);
$time += $epoch_offset;
cmp_ok($unpacked_time1, '==', $time,
"$desc (scalar) unpack_windows_time");