Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update "time" fields (creationTime and publicationTime) into files #222

Closed
ChengShi-1 opened this issue Nov 18, 2024 · 1 comment
Closed
Labels
GREI Re-arch GREI re-architecture-related SPA: File Page Waiting

Comments

@ChengShi-1
Copy link
Contributor

ChengShi-1 commented Nov 18, 2024

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. Thus, in order to prevent the time zone conflict, a timestamp with actual time could help.

Overview of the Feature Request
In filePayload.ts, update the creationDate and pulicationDate from
{"creationDate": string, "publicationDate": string}
to
{"creationDate": string, "creationTime": date, "publicationDate": string, "publicationTime": date}
like
{"creationDate": "2024-11-14", "creationTime":"2024-11-15T21:40:25Z", "publicationDate": "2024-11-14", "publicationTime": "2024-11-15T21:40:25Z"}

Also, fileTransformer, fileModel and all related files need to be changed.

Related to #223

@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. SPA: File Page GREI Re-arch GREI re-architecture-related Original size: 3 labels Nov 18, 2024
@ChengShi-1 ChengShi-1 changed the title update a "time" field into creationDate and publicationDate in filePayload update a "time" fields (creationTime and publicationTime) into files Nov 18, 2024
@ChengShi-1 ChengShi-1 changed the title update a "time" fields (creationTime and publicationTime) into files update "time" fields (creationTime and publicationTime) into files Nov 18, 2024
@ChengShi-1 ChengShi-1 removed Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Nov 21, 2024
@ChengShi-1
Copy link
Contributor Author

After discussion, we don't need the timestamp for creationTime and publicationTime. Thus, I transferred the one from dataverse repo to js-dataverse repo. --> #223

This one should be closed due to duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GREI Re-arch GREI re-architecture-related SPA: File Page Waiting
Projects
Status: Done 🧹
Development

No branches or pull requests

1 participant