Skip to content

Commit

Permalink
Merge pull request #119 from zeronounours/fix_epid_gen_on_linux
Browse files Browse the repository at this point in the history
Fix Epid generation on linux
  • Loading branch information
simonmicro authored Jul 6, 2024
2 parents e60cc1b + 71f31d4 commit 465f4d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py-kms/pykms_PidGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def epidGenerator(kmsId, version, lcid):
minTime = datetime.date(d.year, d.month, d.day)

# Generate Year and Day Number
randomDate = datetime.date.fromtimestamp(random.randint(time.mktime(minTime.timetuple()), time.mktime(datetime.datetime.now().timetuple())))
randomDate = datetime.date.fromtimestamp(random.randint(int(time.mktime(minTime.timetuple())), int(time.mktime(datetime.datetime.now().timetuple()))))
firstOfYear = datetime.date(randomDate.year, 1, 1)
randomDayNumber = int((time.mktime(randomDate.timetuple()) - time.mktime(firstOfYear.timetuple())) / 86400 + 0.5)

Expand Down

0 comments on commit 465f4d1

Please sign in to comment.