mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-04-19 08:55:15 +00:00
Config.py lokal
This commit is contained in:
parent
8f1d23fe9d
commit
72a53d777d
25
config.py
25
config.py
@ -1,25 +0,0 @@
|
|||||||
from datetime import datetime, timedelta
|
|
||||||
|
|
||||||
|
|
||||||
prediction_hours=48
|
|
||||||
strafe=10
|
|
||||||
db_config = {
|
|
||||||
'user': '',
|
|
||||||
'password': '!',
|
|
||||||
'host': '192.168.1.135',
|
|
||||||
'database': 'sensor'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_start_enddate(prediction_hours=48,startdate=None):
|
|
||||||
############
|
|
||||||
# Parameter
|
|
||||||
############
|
|
||||||
if startdate == None:
|
|
||||||
date = (datetime.now().date() + timedelta(hours = prediction_hours)).strftime("%Y-%m-%d")
|
|
||||||
date_now = datetime.now().strftime("%Y-%m-%d")
|
|
||||||
else:
|
|
||||||
date = (startdate + timedelta(hours = prediction_hours)).strftime("%Y-%m-%d")
|
|
||||||
date_now = startdate.strftime("%Y-%m-%d")
|
|
||||||
return date_now,date
|
|
Loading…
x
Reference in New Issue
Block a user