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

Store timezone offset when starting a recording #1042

Merged
merged 1 commit into from
Dec 28, 2021
Merged

Conversation

dennisguse
Copy link
Member

@dennisguse dennisguse commented Dec 8, 2021

This PR adds a time offset to the tracks; all times remain stored as Instant (i.e., UTC).

Data migration: existing Track will use current time offset of the phone.
Import: use the time offset from the KML/GPX

Note: time offset is stored in seconds and denotes the difference from UTC.

Note: PR is based upon #1033.

Fixes #301.

  • add offset column to Track table
  • add field to Track
  • add check in ExportImportTest (export/import for GPX and KML)
  • [ ] use offset for UI renderings: StatisticsRecordedFragment
  • [ ] use offset for naming tracks (default name option)
  • [ ] use offset for UI renderings: TrackListActivity
  • [ ] use offset for UI renderings: MarkerListActivity
  • rebase onto main after merging Storing data without GPS #1033

@dennisguse
Copy link
Member Author

@iointerrupt would have time to test this?
PS: only the internal data handling is implemented, so you need to record and export for now.
Using the time offset in the UI is still to be done.

@dennisguse dennisguse force-pushed the timezone#301 branch 2 times, most recently from 8444cde to d0975e0 Compare December 28, 2021 13:20
@dennisguse dennisguse marked this pull request as ready for review December 28, 2021 13:32
When a recording is started the offset of the phone is used.
Timezone is exported to KML and GPX.

Fixes #301.
@rgmf
Copy link
Member

rgmf commented Dec 28, 2021

@dennisguse in AggregatedStatisticsActivity we are filtering Tracks by datetime (using phone Locale Zone). Shall I review this to adapt to this PR? I mean, TrackSelection should handle starttime_offset, right?

@dennisguse
Copy link
Member Author

@rgmf Valid point; the UI is not yet adjusted, so the data is stored, but the UI doesn't use it.
For now, this is just used for export and imports.
If you have time for this that would be awesome.
I updated the issue and added this as an open point.

@rgmf
Copy link
Member

rgmf commented Dec 28, 2021

@dennisguse okay, I see you are asigned to #301. I have some time so if you don't mind or you want to do other things then change the assignation and I do the list of things you have written out here: #301 (comment)

@dennisguse
Copy link
Member Author

@rgmf feel free to :)
I guess, I will try to refactor the TrackRecordingService in the next (free) days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proper handling of timezone data
2 participants