From eb7dc87971eab0ea796141ac2df37182fccc7231 Mon Sep 17 00:00:00 2001 From: Adam Mills Date: Sun, 17 Jul 2016 20:58:32 -0400 Subject: [PATCH] Use local timezone for log and history dates --- home-assistant-js | 2 +- panels/history/ha-panel-history.html | 16 +++++++++++++++- panels/logbook/ha-panel-logbook.html | 16 +++++++++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/home-assistant-js b/home-assistant-js index b7ac88af0b..3f29d9a833 160000 --- a/home-assistant-js +++ b/home-assistant-js @@ -1 +1 @@ -Subproject commit b7ac88af0bf5a6065c021e47dc6af0f7006b187b +Subproject commit 3f29d9a833a4aeeda350119bffa778fe944faace diff --git a/panels/history/ha-panel-history.html b/panels/history/ha-panel-history.html index 03879ffce3..a31ae46d33 100644 --- a/panels/history/ha-panel-history.html +++ b/panels/history/ha-panel-history.html @@ -36,7 +36,7 @@
+ value='[[selectedDateStr]]'> @@ -94,6 +94,20 @@ Polymer({ return hass.entityHistoryGetters.currentDate; }, }, + + selectedDateStr: { + type: String, + value: null, + bindNuclear: function (hass) { + return [ + hass.entityHistoryGetters.currentDate, + function (currentDate) { + var dateObj = new Date(currentDate); + return dateObj.toLocaleDateString(); + }, + ]; + }, + }, }, isDataLoadedChanged: function (newVal) { diff --git a/panels/logbook/ha-panel-logbook.html b/panels/logbook/ha-panel-logbook.html index d35feb5651..915a0c2410 100644 --- a/panels/logbook/ha-panel-logbook.html +++ b/panels/logbook/ha-panel-logbook.html @@ -37,7 +37,7 @@ @@ -77,6 +77,20 @@ Polymer({ }, }, + selectedDateStr: { + type: String, + value: null, + bindNuclear: function (hass) { + return [ + hass.logbookGetters.currentDate, + function (currentDate) { + var dateObj = new Date(currentDate); + return dateObj.toLocaleDateString(); + }, + ]; + }, + }, + isLoading: { type: Boolean, bindNuclear: function (hass) {