Replies: 1 comment
-
|
Thanks of the report - I will have a look |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Module:
https://github.com/AllskyTeam/allsky-modules/blob/dc720ce6f86af2aa6ae895df21c04744a705bf0b/allsky_pigps/allsky_pigps.py
I am using the GPS module with a Sparkfun NEO-M9N USB GPS module.
I noticed that the local time calculated using GPS is incorrect for my location:
From doing a bit of reading, it appears that while the script correctly identifies timezone offset as -5.0 hours (CDT), it's subtracting this value from UTC when it should be adding it:
Since my offset is -5.0, this calculation becomes:
local = utc - timedelta(hours=-5.0)which is effectively:
local = utc + timedelta(hours=5.0)This adds 5 hours to UTC instead of subtracting 5 hours, resulting in a time that's off by 10 hours from my local actual local time (5 hours in the wrong direction from UTC).
Should line 271 be changed like so?
allsky-modules/allsky_pigps/allsky_pigps.py
Line 265 in dc720ce
from:
local = utc - timedelta(hours=offset)to:
local = utc + timedelta(hours=offset)But this would break the calculation for time zones ahead of the UTC.
Please let me know if my assumption above is incorrect, I am not too well versed with working with time and date values.
Beta Was this translation helpful? Give feedback.
All reactions