Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.55k stars 2.89k forks source link

[$250] Card transaction is showing wrong date #51184

Open m-natarajan opened 3 weeks ago

m-natarajan commented 3 weeks ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: Reproducible in staging?: need reproduction Reproducible in production?: need reproduction If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: 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 Expensify/Expensify Issue URL: Issue reported by: @mountiny Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1729065391600539

I have the automatic timezone and it happened when i was in japan so i believe GMT+9

Action Performed:

  1. Make a transaction on the expensify card Japan time
  2. Open the expense report

    Expected Result:

    Should show the correct date of the transaction

    Actual Result:

    Showing wrong date (previous date)

    Workaround:

    unknown

    Platforms:

    Which of our officially supported platforms is this issue occurring on?

    • [ ] Android: Standalone
    • [ ] Android: HybridApp
    • [ ] Android: mWeb Chrome
    • [ ] iOS: Standalone
    • [ ] iOS: HybridApp
    • [ ] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence ![image (5)](https://github.com/user-attachments/assets/8301f16f-2246-49ae-94ea-e789743c7169) ![image (4)](https://github.com/user-attachments/assets/61101b2d-3989-4215-af77-5c0898a7468a) ![image (3)](https://github.com/user-attachments/assets/b35c3254-3d8f-408b-a6c8-97df42ccdf20)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021849906638089937871
  • Upwork Job ID: 1849906638089937871
  • Last Price Increase: 2024-10-25
Issue OwnerCurrent Issue Owner: @abdulrahuman5196
melvin-bot[bot] commented 3 weeks ago

Triggered auto assignment to @slafortune (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

MelvinBot commented 3 weeks ago

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

slafortune commented 3 weeks ago

I think we need someone specific to retest this in the same timezone.

Wonder if the timezone set in NewDot is affecting this

melvin-bot[bot] commented 2 weeks ago

Job added to Upwork: https://www.upwork.com/jobs/~021849906638089937871

melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External)

abdulrahuman5196 commented 2 weeks ago

Its set for Needs reproduction label and no proposals

slafortune commented 2 weeks ago

Sorry about that @abdulrahuman5196 this actually doesn't need reproductions - @mountiny experienced this and the logs/screenshot shows the results

narefyev91 commented 2 weeks ago

Hi, I'm Nicolay from Callstack - expert contributor group - and I would like to work on this issue.

narefyev91 commented 2 weeks ago

Will post my findings here: The root case of the issue - that we do not use user timezone - when showing info for Transaction.

Screenshot 2024-10-30 at 15 48 32 Screenshot 2024-10-30 at 15 49 09 Screenshot 2024-10-30 at 15 52 01

We use formatWithUTCTimeZone function to prepare Date in date field. And it's just use UTC - instead of user timezone. As an example for the Vit date:

Screenshot 2024-10-30 at 15 54 41

That's why Date is shown incorrectly. We need to rely on user timezone (manually selected/automatically detect) to show correctly the date in date field. Let me know @abdulrahuman5196 wdyt

slafortune commented 1 week ago

Not overdue - just assigned @narefyev91 👍

narefyev91 commented 1 week ago

@abdulrahuman5196 friendly bump here

melvin-bot[bot] commented 1 week ago

@slafortune @narefyev91 @abdulrahuman5196 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] commented 1 week ago

@slafortune, @narefyev91, @abdulrahuman5196 Eep! 4 days overdue now. Issues have feelings too...

narefyev91 commented 1 week ago

@abdulrahuman5196 friendly bump here

abdulrahuman5196 commented 3 days ago

Hi, I was OOO couple of days. Checking back here.

narefyev91 commented 2 days ago

@abdulrahuman5196 any updates here - thanks!

narefyev91 commented 1 day ago

@abdulrahuman5196 any updates here - thanks!

abdulrahuman5196 commented 23 hours ago

Hi, Sorry for delay. Checking now

abdulrahuman5196 commented 23 hours ago

Hi, @narefyev91 I tested the code changes, AFAIK the analysis is correct. But curious question on usecase perspective, if we change this logic to use user's current timezone when displaying the date, we could potentially show different dates when the user switches between one timezone to another. The transaction date should stay same after creation right? cc: @slafortune

narefyev91 commented 7 hours ago

@abdulrahuman5196 good point - technically - what is returned from API should be shown. If in Vit situation - he submitted transaction 2024-10-16. From API side the same date is returned. Probably we should 2 options here - either we do not touch date from API - and just show exactly what is coming or we apply user timezone from preferences.

But i think that if date is already created in one timezone (like in Tokio) and should not be changed - no matter where user will be move next. That's why option to not use any manipulation with date is more preferable. wdyt @abdulrahuman5196