Thanks to Clifford Heath for noticing that Time.to_binary_dos_date and time were reversed
This commit is contained in:
parent
918e66145f
commit
24fbba4288
|
@ -66,13 +66,13 @@ class Time
|
|||
# bits 9-15 year (four digit year minus 1980)
|
||||
|
||||
|
||||
def to_binary_dos_date
|
||||
def to_binary_dos_time
|
||||
(sec/2) +
|
||||
(min << 5) +
|
||||
(hour << 11)
|
||||
end
|
||||
|
||||
def to_binary_dos_time
|
||||
def to_binary_dos_date
|
||||
(day) +
|
||||
(month << 5) +
|
||||
((year - 1980) << 9)
|
||||
|
|
|
@ -426,8 +426,8 @@ module Zip
|
|||
0 , # @version ,
|
||||
0 , # @gpFlags ,
|
||||
@compression_method ,
|
||||
@time.to_binary_dos_date , # @lastModTime ,
|
||||
@time.to_binary_dos_time , # @lastModDate ,
|
||||
@time.to_binary_dos_time , # @lastModTime ,
|
||||
@time.to_binary_dos_date , # @lastModDate ,
|
||||
@crc ,
|
||||
@compressed_size ,
|
||||
@size ,
|
||||
|
@ -496,8 +496,8 @@ module Zip
|
|||
0 , # @versionNeededToExtract ,
|
||||
0 , # @gpFlags ,
|
||||
@compression_method ,
|
||||
@time.to_binary_dos_date , # @lastModTime ,
|
||||
@time.to_binary_dos_time , # @lastModDate ,
|
||||
@time.to_binary_dos_time , # @lastModTime ,
|
||||
@time.to_binary_dos_date , # @lastModDate ,
|
||||
@crc ,
|
||||
@compressed_size ,
|
||||
@size ,
|
||||
|
|
Loading…
Reference in New Issue