Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

round animation start/end to nearest 10min

Jason Kente88331022368
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 875abd963..2d15ac1ca 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -317,9 +317,13 @@ class AnimationWidget extends React.Component {
endDate,
} = this.props;
if (subDailyMode) {
- // for subdaily, zero start and end dates to UTC XX:YY:00:00
+ // for subdaily, zero start and end dates to UTC HH:MM:00:00
+ const startMinutes = startDate.getMinutes();
+ const endMinutes = endDate.getMinutes();
+ startDate.setUTCMinutes(Math.floor(startMinutes / 10) * 10);
startDate.setUTCSeconds(0);
startDate.setUTCMilliseconds(0);
+ endDate.setUTCMinutes(Math.floor(endMinutes / 10) * 10);
endDate.setUTCSeconds(0);
endDate.setUTCMilliseconds(0);
} else {