Skip to content

Commit

Permalink
Fix version evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Aug 27, 2021
1 parent a6b5c59 commit 440a4cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():

if branch.startswith('release-'):
release = [int(i) for i in branch.split('-')[1].split('.')]
delta = datetime.datetime.utcnow() - datetime.datetime(2000 + release[0], release[1], 1)
delta = datetime.datetime(*ttuple[:6]) - datetime.datetime(2000 + release[0], release[1], 1)

print('%d.%d.%s.%d' % (release[0], release[1], '0.%d' % (999 + delta.days,) if delta.days < 0 else (delta.days + 1),
ttuple.tm_hour * 3600 + ttuple.tm_min * 60 + ttuple.tm_sec))
Expand Down

0 comments on commit 440a4cf

Please sign in to comment.