fix datetime
This commit is contained in:
parent
0a2fffb0ed
commit
ade015de38
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user