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

Formatter (formater) is using UTC dates when it shouldn't (7 pts) #3509

Closed
RafaPolit opened this issue Mar 9, 2021 · 3 comments · Fixed by #3698
Closed

Formatter (formater) is using UTC dates when it shouldn't (7 pts) #3509

RafaPolit opened this issue Mar 9, 2021 · 3 comments · Fixed by #3698

Comments

@RafaPolit
Copy link
Member

RafaPolit commented Mar 9, 2021

Our date system has two different types of dates:

  • timestamps representing actual dates
  • timestamps representing times

For both, we store the UTC time for those values. This is correct.

For display purposes, these need to be separated:

  • If you input that an act happen on August 23, 1946, then it should show to everyone as that date, so it needs to be kept as a UTC and its value shown in UTC everywhere.
  • If you want to know when a particular user edited an entity or created a file, then that time should get transformed into your local time, so you know that this was created 2 minutes ago and not, for example, sometime into the future if you are in the Americas and someone created an entity in Europe two minutes ago.

The formatter is doing the wrong thing with Creation Date and Modification Date.

When this is fixed, the tests on TableRow.tsx will start failing again and should be updated. Probably other places are affected as well.

@nwyu
Copy link
Contributor

nwyu commented Mar 10, 2021

Related: #3451

@RafaPolit
Copy link
Member Author

To check: apparently the formatter (formater.js) is not addressing AT ALL the common properties: title, creationDate, editDate. They are coming RAW from the entity and not being formatted at all (or included the custom title lable, etc.). So this issue may actually need to actually do that together with changing the way dates are processed.

@konzz konzz changed the title Formatter (formater) is using UTC dates when it shouldn't Formatter (formater) is using UTC dates when it shouldn't (7 pts) May 11, 2021
@daneryl daneryl added the Sprint label May 27, 2021
@daneryl daneryl mentioned this issue May 28, 2021
7 tasks
@daneryl
Copy link
Collaborator

daneryl commented May 28, 2021

we need to check if csv export properly formats creationDate and editDate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants