virusseq / portal-ui

Canadian VirusSeq Data Portal
https://virusseq-dataportal.ca/
GNU Affero General Public License v3.0
8 stars 8 forks source link

Sample Collected date is one day offset earlier/before the user-provided date #259

Open ghost opened 2 years ago

ghost commented 2 years ago

We need the portal to display the same sample collected date as uploaded in the files. Initial investigation suggests possible issue in the display on the arranger while converting raw string to date. (the services consider the local timezone and hence the difference)

related ticket - cancogen-virus-seq/portal#251

leoraba commented 1 year ago

This is a display issue converting string with format yyyy-MM-dd to local Date format to be displayed in the Explorer page. , this might affect all the date fields without a specific timezone because they are considered as UTC and displayed in local timezone.

justincorrigible commented 1 year ago

That's right. Also, we must consider the data submitted here comes from different time zones, so assuming a single one for all of the records would render at least some of them inaccurate. That approach would be far from ideal, as this data is handled by Arranger, which is meant to be a generic tool (i.e. it's not VirusSeq specific). Any viable solution needs to be generic enough to apply to other projects that rely on these shared components.

At first glance, we could enhance Arranger to receive dynamic calculation functionalities (through customised columns), to calculate the proper time zone for each record based on the location of the study that submitted them. However, currently I cannot quite fathom what that would look like when implementing the corresponding facet filters.

This requires further analysis and discussion.