You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-08-30] [$1000] Date is incorrect after editing money request #25441
Verify that the selected date is incorrect after you tap Save
Expected Result:
Date is correct
Actual Result:
Date is incorrect
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: Reproducible in staging?: Reproducible in production?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL: Issue reported by: Slack conversation:
Please re-state the problem that we are trying to solve in this issue.
After editing a money request the date is incorrect
What is the root cause of that problem?
The root cause is that we are using TransactionUtils.getCreated to get the date and in that function we transform the string representing the date to a date object using new Date(). In javascript using new Date without the time can make the date component not use the local timezone (the timezone depends of the format) which can result in having a day off.
What changes do you think we should make in order to solve the problem?
We can use the method parseISO of date-fns to parse the date like this
We can also pass the date with a format that avoid this weird behaviour, for example we can transform our string like this yyyy/mm/dd by replacing - with /
I think this is interesting but just curios if there is anything else we can use without some special treatment. Is there some param we can pass to the Date() maybe? Or use something from the date-fns? cc @waterim
In any case, @ArekChr I don't see a BZ checklist completed for this issue? Do you mind completing one, including whether a regression test is required? Thank you!
Activity
melvin-bot commentedon Aug 17, 2023
Triggered auto assignment to @stephanieelliott (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 17, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)[-]Date is incorrect after editing money request[/-][+][$1000] Date is incorrect after editing money request[/+]melvin-bot commentedon Aug 17, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0154a57cff1cce910b
melvin-bot commentedon Aug 17, 2023
Current assignee @stephanieelliott is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Aug 17, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr (
External)ShogunFire commentedon Aug 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
After editing a money request the date is incorrect
What is the root cause of that problem?
The root cause is that we are using TransactionUtils.getCreated to get the date and in that function we transform the string representing the date to a date object using new Date(). In javascript using new Date without the time can make the date component not use the local timezone (the timezone depends of the format) which can result in having a day off.
What changes do you think we should make in order to solve the problem?
We can use the method parseISO of date-fns to parse the date like this
What alternative solutions did you explore? (Optional)
We can add the time behind the date like this
T00:00to force it to use the local datemountiny commentedon Aug 17, 2023
Wow nice @ShogunFire
I think this is interesting but just curios if there is anything else we can use without some special treatment. Is there some param we can pass to the Date() maybe? Or use something from the date-fns? cc @waterim
50 remaining items
ShogunFire commentedon Sep 12, 2023
Friendly bump @JmillsExpensify
melvin-bot commentedon Sep 18, 2023
@JmillsExpensify, @ShogunFire, @ArekChr, @mountiny Eep! 4 days overdue now. Issues have feelings too...
sophiepintoraetz commentedon Sep 20, 2023
Confirming that the payment due to @ShogunFire (Pierre M) is $1500 here, correct? @JmillsExpensify @mountiny?
melvin-bot commentedon Sep 20, 2023
@JmillsExpensify, @ShogunFire, @ArekChr, @mountiny Still overdue 6 days?! Let's take care of this!
mountiny commentedon Sep 21, 2023
@sophiepintoraetz that is correct, thanks for helping
sophiepintoraetz commentedon Sep 21, 2023
Payment done - is there anything else keeping this issue open?
JmillsExpensify commentedon Sep 21, 2023
Ah so sorry for the delay on this one. Don't hesitate to reach out to me via New Expensify DM.
JmillsExpensify commentedon Sep 21, 2023
In any case, @ArekChr I don't see a BZ checklist completed for this issue? Do you mind completing one, including whether a regression test is required? Thank you!
ArekChr commentedon Sep 21, 2023
JmillsExpensify commentedon Sep 25, 2023
Great thank you! All done here.