BCDA-APS / gemviz

Data visualization for tiled
https://bcda-aps.github.io/gemviz/
Other
4 stars 0 forks source link

Increase date range for DateTimeRangeSlider #71

Closed prjemian closed 1 year ago

prjemian commented 1 year ago

The DateTimeRangeSlider is limited to maximum possible date of: 2038-01-18 21:14:07 (UTC).

Attempts to set the maximum to later dates result in this exception:

    self.slider.setMaximum(self._slider_units(self._maximum))
OverflowError: argument 1 overflowed: value must be in the range -2147483648 to 2147483647

This limitation is imposed by using integer seconds with the slider (from the underlying Qt C++ library): https://github.com/BCDA-APS/tiled-viz2023/blob/fd52533d5aed91d29fd9c9e2b651f74477986255/gemviz23/demo/date_time_range_slider.py#L129

The QSlider uses an integer. The largest integer represents a timestamp resulting in the maximum possible date shown above.

Increase the range of the DateTimeRangeSlider widget by converting the slider to use integer days rather than integer seconds. A pair of conversion methods will help.

prjemian commented 1 year ago

The range should increase to include the latest possible start time of data to be viewed. The current limit of 2038 is too restrictive.