src/java.base/share/classes/java/util/zip/ZipUtils.java
Print this page
*** 97,109 ****
Date d = new Date(time);
int year = d.getYear() + 1900;
if (year < 1980) {
return ZipEntry.DOSTIME_BEFORE_1980;
}
! return (year - 1980) << 25 | (d.getMonth() + 1) << 21 |
d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
! d.getSeconds() >> 1;
}
/**
* Converts Java time to DOS time, encoding any milliseconds lost
* in the conversion into the upper half of the returned long.
--- 97,109 ----
Date d = new Date(time);
int year = d.getYear() + 1900;
if (year < 1980) {
return ZipEntry.DOSTIME_BEFORE_1980;
}
! return ((year - 1980) << 25 | (d.getMonth() + 1) << 21 |
d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
! d.getSeconds() >> 1) & 0xffffffffL;
}
/**
* Converts Java time to DOS time, encoding any milliseconds lost
* in the conversion into the upper half of the returned long.