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

Date conversion bug in Journal app #185

Open
b1conrad opened this issue Jul 27, 2020 · 2 comments
Open

Date conversion bug in Journal app #185

b1conrad opened this issue Jul 27, 2020 · 2 comments
Assignees
Labels

Comments

@b1conrad
Copy link
Member

There is a function convertDate that is defined in two different places here. Two problems with this code:

  1. If the time change required (for time zone of owner) changes the date, this code doesn't compute the correct date.
  2. When this is fixed, it will have to be done in both places (so maybe there should only be one place?)

Another possibility would be to use code that already exists, rather than rolling our own (and risking this kind of problem), for example, either moment or strftime ought to provide what we need.

@b1conrad b1conrad added the bug label Jul 27, 2020
@windley
Copy link
Member

windley commented Jul 27, 2020

Yes, the built-in functions are preferable. Was there a reason they didn't work?

@KandareJ KandareJ self-assigned this Aug 11, 2020
@KandareJ
Copy link
Contributor

There is no good reason for writing our own function. It was my first manifold app and the convertDate function was from the first stack overflow response on how to convert a timestamp that I found. I'm not sure how that code got duplicated. I assigned myself and I'll fix it.

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

No branches or pull requests

3 participants