Pre Merge pull request !8 from hunter524/fix_issue_I3HUPC

pull/8/MERGE
hunter524 2021-04-12 14:06:47 +08:00
commit b0ce48fd2f
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,10 @@ public class LicenseFileRecord implements EvalRecord {
public LicenseFileRecord(File file) {
this.file = file;
if (file.length() == 0) {
expireDate = new Date(~System.currentTimeMillis());
return;
}
try (DataInputStream dis = new DataInputStream(new FileInputStream(file))) {
expireDate = DateTime.DF_DATETIME.format(new Date(~dis.readLong() + 2592000000L));
} catch (Exception e) {