Helioviewer-Project / helioviewer.org

Main web application for solar data visualization
Other
18 stars 15 forks source link

Movies are requested with an invalid time 000Z.000Z #448

Closed dgarciabriseno closed 1 year ago

dgarciabriseno commented 1 year ago

The timestamp in the layer string for movies and screenshots sometimes coming in ending in 000Z.000Z. For example:

[SOHO,LASCO,C2,white-light,2,100,0,60,1,2017-05-18T15:35:00.000Z.000Z],[SOHO,LASCO,C3,white-light,3,100,0,60,1,2017-05-18T15:35:00.000Z.000Z],[SDO,AIA,304,1,100,0,60,1,2017-11-16T09:02:20.000Z.000Z]

The above request happened today.

There are several places in javascript where "000Z" is added to the end of a date.

dgarciabriseno commented 1 year ago

I traced the source to this line, but I can't figure out what conditions make baseDiffTime a UTC date string that already has the 000Z on it.

https://github.com/Helioviewer-Project/helioviewer.org/blob/921ead0c7929d9127c5ab3093a2e8f46c4bcd562/resources/js/Tiling/Layer/TileLayer.js#L100

dgarciabriseno commented 1 year ago

Apparently this issue has happened before.

https://github.com/Helioviewer-Project/helioviewer.org/blob/921ead0c7929d9127c5ab3093a2e8f46c4bcd562/resources/js/Tiling/Layer/HelioviewerTileLayer.js#L115

dgarciabriseno commented 1 year ago

This needs to be normalized into one function that returns the date in the format 2023-03-01T10:33:00.000Z

dgarciabriseno commented 1 year ago

Issue first seen on helioviewer in 2017-09-13. ~19,730 movies have been requested but not created because of this error. 2,144 movies in 2023. I'll re-queue the last 625 failures made in the last 2 weeks. I expect it shows up as "error" in the users' movie dropdown now. It should show up as complete after requeueing.~ I got ahead of myself. That many movies do have that invalid date, but they haven't all failed to make movies. I'm not sure why some fail to parse the invalid date but others don't.

After doing a better query than just looking for the duplicate 000Z. There are 3,043 movie failures since 2017 with the double 000Z in the layer string. I can't confirm if they were caused by the double 000Z or something else. But I know that at least one was the double Z otherwise I wouldn't have noticed.

btaylor-sesda commented 1 year ago

@dgarciabriseno I updated HelperFunctions.js with the function, and modified HelioviewerTileLayer.js and TileLayer.js to return the timestamp string from the call. via #449