Change file creation date and publication date in FileModel from date object to string type #223
Labels
FY25 Sprint 11
FY25 Sprint 11 (2024-11-20 - 2024-12-04)
GREI Re-arch
GREI re-architecture-related
Original size: 3
Size: 3
A percentage of a sprint. 2.1 hours.
SPA: File Page
SPA.Q4.10
Resolve TODOs and tech debt
What inspired the request?
This issue is inspired when I found that once the file uploaded, it was always saved as midnight 12:00 AM UTC, regardless of the hour, and 12:00 AM UTC was as 7:00 PM EST on the previous day (my local time zone). This discrepancy caused the file date in the front-end page, followed users' local timezone, to appear a day earlier than the intended date. For example, I uploaded the file Nov. 14 would be saved Nov.14 12:00 AM UTC, but shown Nov. 13 locally due to a conversion from UTC to EST.
Overview of the Feature Request
We discussed on the weekly update meeting Nov. 21st for this issue, and decided to keep the
string
type from backend api endpoint as it was, rather than converting to the date object with timestamp, for file'screationDate
andpublicationDate
. Since there are possible time zone conflict for the citation usage, it's better to keep the date fixed and constant for all users in different location.Change the date object in FileModel for file creation date and publication date to string, and handle it as a string for all related components.
The text was updated successfully, but these errors were encountered: