Skip to content

Commit

Permalink
Merge pull request #303 from kubajir/query_time_widget
Browse files Browse the repository at this point in the history
Fix QueryTime unit change
  • Loading branch information
petebryan authored Jan 29, 2022
2 parents 5e879a4 + c5a75f3 commit 9cb1ee0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions msticpy/nbtools/nbwidgets/query_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ def _change_time_unit(self, change):
self._w_tm_range.value = (-self.before, self.after)
self._w_tm_range.min = -self.max_before
self._w_tm_range.max = self.max_after
self._query_start = self.origin_time + timedelta(
0, self._w_tm_range.value[0] * self._time_unit.value
)
self._query_end = self.origin_time + timedelta(
0, self._w_tm_range.value[1] * self._time_unit.value
)
self._w_start_time_txt.value = self._query_start.isoformat(sep=" ")
self._w_end_time_txt.value = self._query_end.isoformat(sep=" ")

def _get_time_parameters(self, **kwargs):
"""Process different init time parameters."""
Expand Down

0 comments on commit 9cb1ee0

Please sign in to comment.