Skip to content

Commit

Permalink
RTC detect complete
Browse files Browse the repository at this point in the history
  • Loading branch information
joverbee committed Jan 21, 2018
1 parent 25ba732 commit bf14d0f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/html/home.htm
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,8 @@ <h2 class="right" data-bind="text: status.estate"></h2>
</tr>
<tr>
<td><span data-bind="text: scaleString(status.amp(), 1000, 2) + ' A'"></span></td>
<td><span data-bind="text: scaleString(status.wattsec(), 3600000, 2) + ' kWh'"></span></td>
<!--<td><span data-bind="text: scaleString(status.wattsec(), 3600000, 2) + ' kWh'"></span></td>-->
<td><span data-bind="text: scaleString(status.wattsec(), 3600000, 2) + ' kWh' +' ('+ scaleString(status.wattsec(), 3600000/3, 2) +'kWh 3phase)' "></span></td>
<td><span data-bind="text: scaleString(status.wattsec(), 3600000, 2) + ' kWh' "></span></td>
<td><span data-bind="text: openevse.time.elapsed"></span></td>
</tr>
</table>
Expand Down
8 changes: 0 additions & 8 deletions src/html/openevse.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,9 @@ function OpenEVSE(endpoint)
var second = parseInt(data[5]);

if(!isNaN(year) && !isNaN(month) && !isNaN(day) && !isNaN(hour) && !isNaN(minute) && !isNaN(second)) {
<<<<<<< HEAD
if(year==165 && month==165 && day==165 && hour==165 && minute==165 && second==85){
//no RTC connected, use browser clock instead
var date = new Date();
} else {
var date = new Date(2000+year, month, day, hour, minute, second);
=======
var date = new Date(0);
if (!(year==165 && month==165 && day==165 && hour==165 && minute==165 && second==85)){
date = new Date(2000+year, month, day, hour, minute, second);
>>>>>>> stable
}
callback(date);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/html/view_models/TimeViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function TimeViewModel(openevse)
return "0:00:00";
}
var dt = self.elapsedNow();
return addZero(dt.getHours())+":"+addZero(dt.getMinutes())+":"+addZero(dt.getSeconds());
return addZero(dt.getUTCHours())+":"+addZero(dt.getMinutes())+":"+addZero(dt.getSeconds());
});

openevse.status.elapsed.subscribe(function (val) {
Expand Down

0 comments on commit bf14d0f

Please sign in to comment.