fix strftime format in current air/water updates
authorgregor herrmann <gregor@toastfreeware.priv.at>
Thu, 6 Sep 2018 16:19:19 +0000 (18:19 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Thu, 6 Sep 2018 16:19:19 +0000 (18:19 +0200)
web/static/seepark_web.js

index fdc5377087f223bf257cd134ed73471d2f22a8db..88854ca5babe7b5a9bd52d09022bcd6d025c4bc9 100644 (file)
@@ -220,7 +220,7 @@ setInterval(
                        .then((resp) => resp.json())
                        .then(function(data) {
                                airvalue.innerText = data['value'].toFixed(1);
-                               airtime.innerText  = strftime('%Y-%m-%d H:%M', new Date(data['timestamp']));
+                               airtime.innerText  = strftime('%Y-%m-%d %H:%M', new Date(data['timestamp']));
                        })
                        .catch(function(error) {
                                console.log(error);
@@ -229,7 +229,7 @@ setInterval(
                        .then((resp) => resp.json())
                        .then(function(data) {
                                watervalue.innerText = data['value'].toFixed(1);
-                               watertime.innerText  = strftime('%Y-%m-%d H:%M', new Date(data['timestamp']));
+                               watertime.innerText  = strftime('%Y-%m-%d %H:%M', new Date(data['timestamp']));
                        })
                        .catch(function(error) {
                                console.log(error);