fix datetime

This commit is contained in:
robert 2021-01-24 23:20:52 +01:00
parent 0a2fffb0ed
commit ade015de38
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import time
import datetime
from datetime import datetime
import subprocess
import sys
@ -14,7 +14,7 @@ import paho.mqtt.client as paho
now = datetime.now()
#print("now =", now)
#Output format: DD/MM/YYYY H:M:S
dt_string = now.strftime("%d/%m/%Y %H:%M:%S")
dt_string = now.strftime("%d-%m-%Y %H:%M:%S")
# MQTT credentials
#mqtt_username = 'homeassistant' # MQTT client username