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

Allow entering dates without times #74

Open
dbrgn opened this issue Sep 25, 2020 · 1 comment
Open

Allow entering dates without times #74

dbrgn opened this issue Sep 25, 2020 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@dbrgn
Copy link
Owner

dbrgn commented Sep 25, 2020

Follow-up of #73.

If you still know the day but not the launch or landing time, it should be possible to enter only the day.

@dbrgn dbrgn added the enhancement New feature or request label Sep 25, 2020
@dbrgn dbrgn added this to the Public Beta milestone Sep 25, 2020
@dbrgn dbrgn added bug Something isn't working enhancement New feature or request and removed enhancement New feature or request bug Something isn't working labels Apr 18, 2021
@dbrgn
Copy link
Owner Author

dbrgn commented Apr 18, 2021

I'm not yet sure what the ideal solution would be.

We should probably store date and time separately, with the time being optional. However, time zone handling is a bit tricky.

Schema

Change from

launch_time TIMESTAMP WITH TIME ZONE NULL
landing_time TIMESTAMP WITH TIME ZONE NULL

to

launch_day DATE NULL
launch_time TIME WITH TIME ZONE NULL
landing_day DATE NULL
landing_time TIME WITH TIME ZONE NULL

The time zone moves from the timestamp field to the time field. The application needs to ensure that the proper UTC date is picked for a timestamp, so that when date and time are combined, the same timestamp results.

UI

Right now only a single date can be entered. However, since the times are UTC, when flying in time zones far away from UTC, a flight might cross the UTC date boundary. Therefore we'd need to split up launch and landing date into separate fields.

Right now time should always be entered for UTC. Time zone could be explicitly entered, or it could be derived from the IGC file or the location. In the future, the user could choose whether to show local time, launch time or UTC time.

(What if the user flies across a DST change? I don't want to go down that rabbit hole... Maybe we should completely eliminate time zones from the data and always assume local time?)

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

No branches or pull requests

1 participant