Skip to content

Commit

Permalink
fix use of POSIX::mktime
Browse files Browse the repository at this point in the history
  • Loading branch information
pmqs committed Apr 15, 2022
1 parent 7c15a4d commit 6f4aa95
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/zipdetails
Original file line number Diff line number Diff line change
Expand Up @@ -2238,12 +2238,9 @@ sub _dosToUnixTime
my $sec = ( ( $dt << 1 ) & 0x3e );


use POSIX 'mktime';
use POSIX ;

# Force mktime to return a UTC time
local $ENV{TZ} = "UTC";

my $time_t = mktime( $sec, $min, $hour, $mday, $mon, $year, 0, 0, -1 );
my $time_t = POSIX::mktime( $sec, $min, $hour, $mday, $mon, $year, 0, 0, 0 );
return 0 if ! defined $time_t;
return $time_t;
}
Expand Down

0 comments on commit 6f4aa95

Please sign in to comment.