NASA-AMMOS / aerie-ui

The client application for Aerie.
https://nasa-ammos.github.io/aerie-docs/
MIT License
29 stars 5 forks source link

Simulated Activities Table reports incorrect Absolute End Time #1087

Closed DavidLegg closed 7 months ago

DavidLegg commented 8 months ago

Checked for duplicates

Yes - I've already checked

Is this a regression?

No - This is a new bug

Version

2.1.0

Describe the bug

In the Simulated Activities Table, the Absolute End Time isn't equal to the Absolute Start Time plus the Duration. The Absolute Start Time and Duration agree with the timeline and roughly what I expected to see, so I think they're correct.

Screenshot 2024-01-10 at 3 04 34 PM

Reproduction

Schedule and simulate any activity, then observe its row in the Simulated Activities Table.

Logs

No response

System Info

Local Aerie deployment

Severity

Minor

joswig commented 8 months ago

The offset looks to be the offset from UTC as changing my local TZ and reloading alters the end time

Mythicaeda commented 8 months ago

Moving this issue to the UI repo as it's a bug in how the Absolute End Time column's values are calculated in ActivitySpansTablePanel.svelte. Specifically, it's occurring during the second call to getDoyTimeFromInterval, where the timezone of startDate is incorrectly set to the user's local timezone instead of UTC. My theory is that something in either this function or convertDoyToYmd is stripping the timezone component, as startTime is missing the +00:00 that sim dataset start time has to mark it as being in UTC.

@AaronPlave, do you think this could be related to a change made during https://github.com/NASA-AMMOS/aerie-ui/pull/977 or https://github.com/NASA-AMMOS/aerie-ui/pull/998? That was when the UI started displaying some values in the users local timezone and was released in v2.1.0.