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

Time used is not correct during the mission #1442

Closed
anetteu opened this issue Feb 29, 2024 · 6 comments · Fixed by #1471
Closed

Time used is not correct during the mission #1442

anetteu opened this issue Feb 29, 2024 · 6 comments · Fixed by #1471
Labels
bug Something isn't working frontend Frontend related functionality

Comments

@anetteu
Copy link
Member

anetteu commented Feb 29, 2024

Describe the bug
During a mission, time used is not correct for all missions. Typically, it shows 60-80 minutes instead of 0-20 minutes. I have not confirmed it, but suspect that there might be an hour offset. The time used is shown correctly for the mission in the history page.

To Reproduce
Steps to reproduce the behavior: Start a mission and monitor the time used on the mission page during the mission.

Expected behavior
The time used should be correct.

Screenshots
If applicable, add screenshots to help explain your problem.

@anetteu anetteu added bug Something isn't working frontend Frontend related functionality labels Feb 29, 2024
@mrica-equinor mrica-equinor added the good first issue Good for newcomers label Mar 5, 2024
@Eddasol
Copy link
Contributor

Eddasol commented Mar 11, 2024

Suspect difference in time zone for missions received through API call and missions received through signal R

This PR ensures local time for variables fetched through API call. Might be useful to understand the issue
#1330

@tsundvoll tsundvoll removed the good first issue Good for newcomers label Mar 11, 2024
@tsundvoll
Copy link
Contributor

@aestene , do you have some input on the way to solve this?

@andchiind
Copy link
Contributor

The issue seems to be related to this: https://stackoverflow.com/questions/40205893/datetime-kind-set-to-unspecified-not-utc-upon-loading-from-database
When we start a mission, the datetime "kind" value is set to UTC, which is received at the frontend with the "Z" flag at the end. When we read the mission in from the database however, the "kind" is not set, causing it to be sent to the frontend without the flag.

@andchiind
Copy link
Contributor

See #1476

@andchiind andchiind reopened this Mar 20, 2024
@andchiind andchiind removed their assignment Apr 9, 2024
@tsundvoll
Copy link
Contributor

If this is not formalized somewhere, I think we should always store a datetime as UTC, and only when we display it in the frontend will we change it to local time. Any thoughts on this strategy, @andchiind and @Eddasol

@oysand oysand added this to the Ready for users milestone Apr 28, 2024
@Eddasol
Copy link
Contributor

Eddasol commented Jun 13, 2024

Should be fixed by #1553

@Eddasol Eddasol closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Frontend related functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants