Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TZ Awareness Issue When Calculating Sync Delta #50

Open
sco1 opened this issue Feb 13, 2025 · 0 comments · May be fixed by #52
Open

TZ Awareness Issue When Calculating Sync Delta #50

sco1 opened this issue Feb 13, 2025 · 0 comments · May be fixed by #52
Labels
bug Something isn't working

Comments

@sco1
Copy link
Owner

sco1 commented Feb 13, 2025

Starting to receive this during file processing & in the test suite

File pyflysight\pyflysight\flysight_proc.py:731, in calculate_sync_delta(track_data, time_sensor)
    [728](file:///pyflysight/pyflysight/flysight_proc.py:728) gps_dt = GPS_EPOCH + tow_delta
    [729](file:///pyflysight/pyflysight/flysight_proc.py:729) sensor_start = gps_dt - dt.timedelta(seconds=time_sensor["elapsed_time"][0])
--> [731](file:///pyflysight/pyflysight/flysight_proc.py:731) track_offset: float = (track_data["time"][0] - sensor_start).total_seconds()
    [732](file:///pyflysight/pyflysight/flysight_proc.py:732) return track_offset

TypeError: can't subtract offset-naive and offset-aware datetimes

Just bumped dependencies on the feature branch so need to look into where the issue was introduced.

@sco1 sco1 added the bug Something isn't working label Feb 13, 2025
sco1 added a commit that referenced this issue Feb 13, 2025
Fixes issue when calculating sync delta, as the dataframe contents are tz-aware (UTC)

See: #50
@sco1 sco1 linked a pull request Mar 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant