readjust step in predict and add dateformating function

This commit is contained in:
fram3d 2023-10-05 02:19:52 +02:00
parent 89e802aa57
commit 5604fac1b2
Signed by: fram3d
GPG Key ID: 938920E709EEA32A
2 changed files with 10 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
__pycacahe__/*
freeriders/__pycacahe__/*
instance/

View File

@ -1,4 +1,9 @@
import time
import datetime
def datetounix(day, month, year, hour, minute, second):
seconds = datetime.datetime(year, month, day, hour, minute, second).timestamp()
return int(seconds)
def formatprefix2(number):
return "{:02d}".format(number)
@ -7,10 +12,10 @@ def formatprefix10(number):
return "{:010d}".format(number)
def predict(timestamp):
base_ticket = 4339636
base_timestamp = 1694003498
step = 8
base_ticket = 7157662
base_timestamp = 1695887564
step = 0.688
ticket = base_ticket + (timestamp - base_timestamp) * step
return ticket
return int(ticket)