Use local timezone for log and history dates

This commit is contained in:
Adam Mills
2016-07-25 12:02:36 -04:00
parent c263545bda
commit eb7dc87971
3 changed files with 31 additions and 3 deletions
+15 -1
View File
@@ -37,7 +37,7 @@
<paper-input
label='Showing entries for'
id='datePicker'
value='[[selectedDate]]'
value='[[selectedDateStr]]'
on-focus='datepickerFocus'
></paper-input>
@@ -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) {