Skip to content

Commit

Permalink
fixed deviation time
Browse files Browse the repository at this point in the history
  • Loading branch information
jirhiker committed Sep 14, 2018
1 parent d4f935a commit b8c9802
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion wellpy/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ def _calculate_deviations(self, mxs, mys, cxs, cys):
idx = where(cxs - mx < 60)[0]
if idx.size:
idx = idx[-1]
dev = Deviation(idx=midx, time_s=int(idx), manual=my, continuous=cys[idx])
dev = Deviation(idx=midx, time_s=int(idx),
timestamp=datetime.fromtimestamp(mx).strftime('%m/%d/%Y'),
manual=my, continuous=cys[idx])
devs.append(dev)

self.deviations = devs
Expand Down
2 changes: 1 addition & 1 deletion wellpy/tasks/panes.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def traits_view(self):


class DeviationAdapter(TabularAdapter):
columns = [('Time', 'time_s'),
columns = [('Time', 'timestamp'),
('Manual Index', 'idx'),
('Deviation', 'deviation'),
('Manual', 'manual'),
Expand Down

0 comments on commit b8c9802

Please sign in to comment.