precisiontox / ptox-metadata-manager

The PrecisionTox Metadata Manager API
https://mm.precisiontox.org
GNU Affero General Public License v3.0
2 stars 1 forks source link

Date mismatch between selected dates and display dates #167

Open proccaserra opened 1 week ago

proccaserra commented 1 week ago

Description:

I also noticed a possible bug. When selecting start and end dates, you need to select the date before to have the correct date shown on screen. I noticed this a couple of months ago when creating the first files, as I'm sure everyone else did. It wasn't a big problem so I didn't mention it. I've just noticed that the dates in the excel files that are generated seem to be the actual dates clicked and not the ones shown as selected in the metadata manager. Is there any chance you could double check this as no one else seems to have picked up on it?

knirirr commented 1 week ago

The source of this is, as far as I can tell, the following line of code in the metadata manager client:

https://github.com/ISA-tools/ptox-metadata-manager-client/blob/main/src/utils/dates.js#L3

I don't know why that's there. @proccaserra do you know a particular reason why 1 (day presumably) is added to dates when they're formatted for display?