convert milliseconds to date and time

This commit is contained in:
Adrian Zürcher
2025-05-01 12:52:19 +02:00
parent 75eb31abf6
commit 0fe813acd9

View File

@@ -54,7 +54,7 @@ func (d *DBMHandler) GoSystemTime() error {
for { for {
t := time.Now().UnixMilli() t := time.Now().UnixMilli()
if tOld != t { if tOld != t {
if er := d.DB.UpdateDatapointValue(d.Conns, t, path); er != nil { if er := d.DB.UpdateDatapointValue(d.Conns, time.UnixMilli(t).Format("2006-01-02 15:04:05"), path); er != nil {
d.Log.Error("dmb.Handler.AddSystemDps.UpdateDatapointValue", er.Error()) d.Log.Error("dmb.Handler.AddSystemDps.UpdateDatapointValue", er.Error())
} }
tOld = t tOld = t