Skip to content

Change file creation date and publication date in FileModel from date object to string type #223

@ChengShi-1

Description

@ChengShi-1

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's creationDate and publicationDate. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions