From 9734511c50274db8131326a57600c2f04fdcbdc8 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Tue, 29 Mar 2022 10:48:53 +0100 Subject: [PATCH] Fix satellite tracks when timezone isn't UTC --- plugins/feature/satellitetracker/satellitetrackersgp4.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/feature/satellitetracker/satellitetrackersgp4.cpp b/plugins/feature/satellitetracker/satellitetrackersgp4.cpp index 709a4c561..19c51518e 100644 --- a/plugins/feature/satellitetracker/satellitetrackersgp4.cpp +++ b/plugins/feature/satellitetracker/satellitetrackersgp4.cpp @@ -23,6 +23,8 @@ #include #include +#include + #include "util/units.h" #include "satellitetrackersgp4.h" @@ -62,7 +64,7 @@ void getGroundTrack(QDateTime dateTime, // For 3D map, we want to quantize to minutes, so we replace previous // position data, rather than insert additional positions alongside the old // which can result is the camera view jumping around - dateTime = QDateTime(dateTime.date(), QTime(dateTime.time().hour(), dateTime.time().minute())); + dateTime = QDateTime(dateTime.date(), QTime(dateTime.time().hour(), dateTime.time().minute()), dateTime.timeZone()); // Note 2D map doesn't support paths wrapping around Earth several times // So we just have a slight overlap here, with the future track being longer