readjust step in predict and add dateformating function
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
__pycacahe__/*
|
||||
freeriders/__pycacahe__/*
|
||||
instance/
|
||||
|
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user