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)
|
# bits 9-15 year (four digit year minus 1980)
|
||||||
|
|
||||||
|
|
||||||
def to_binary_dos_date
|
def to_binary_dos_time
|
||||||
(sec/2) +
|
(sec/2) +
|
||||||
(min << 5) +
|
(min << 5) +
|
||||||
(hour << 11)
|
(hour << 11)
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_binary_dos_time
|
def to_binary_dos_date
|
||||||
(day) +
|
(day) +
|
||||||
(month << 5) +
|
(month << 5) +
|
||||||
((year - 1980) << 9)
|
((year - 1980) << 9)
|
||||||
|
|
|
@ -426,8 +426,8 @@ module Zip
|
||||||
0 , # @version ,
|
0 , # @version ,
|
||||||
0 , # @gpFlags ,
|
0 , # @gpFlags ,
|
||||||
@compression_method ,
|
@compression_method ,
|
||||||
@time.to_binary_dos_date , # @lastModTime ,
|
@time.to_binary_dos_time , # @lastModTime ,
|
||||||
@time.to_binary_dos_time , # @lastModDate ,
|
@time.to_binary_dos_date , # @lastModDate ,
|
||||||
@crc ,
|
@crc ,
|
||||||
@compressed_size ,
|
@compressed_size ,
|
||||||
@size ,
|
@size ,
|
||||||
|
@ -496,8 +496,8 @@ module Zip
|
||||||
0 , # @versionNeededToExtract ,
|
0 , # @versionNeededToExtract ,
|
||||||
0 , # @gpFlags ,
|
0 , # @gpFlags ,
|
||||||
@compression_method ,
|
@compression_method ,
|
||||||
@time.to_binary_dos_date , # @lastModTime ,
|
@time.to_binary_dos_time , # @lastModTime ,
|
||||||
@time.to_binary_dos_time , # @lastModDate ,
|
@time.to_binary_dos_date , # @lastModDate ,
|
||||||
@crc ,
|
@crc ,
|
||||||
@compressed_size ,
|
@compressed_size ,
|
||||||
@size ,
|
@size ,
|
||||||
|
|
Loading…
Reference in New Issue