fix datetime

This commit is contained in:
robert 2021-01-24 23:20:52 +01:00
parent 0a2fffb0ed
commit ade015de38

View File

@ -1,5 +1,5 @@
import time import time
import datetime from datetime import datetime
import subprocess import subprocess
import sys import sys
@ -14,7 +14,7 @@ import paho.mqtt.client as paho
now = datetime.now() now = datetime.now()
#print("now =", now) #print("now =", now)
#Output format: DD/MM/YYYY H:M:S #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 credentials
#mqtt_username = 'homeassistant' # MQTT client username #mqtt_username = 'homeassistant' # MQTT client username