ivy-wallet
ivy-wallet copied to clipboard
[BUG] when I have an unlisted account (not counted towards total balance), the date of my transaction changes to the next day
Please confirm the following
- [X] I checked the current issues for duplicate problems
Describe the bug
when I have an unlisted account (not counted towards total balance), the date of my transaction changes to the next day
To Reproduce
- have an unlisted account
- create transaction (expense)
- transaction date displayed is of tomorrow
Expected behavior
the date of the transaction shouldve reflected the transaction input period
Screenshots
No response
App version
v2024.07.28-192
Smartphone
Samsung S21 FE
Additional context
No response
Revision To Recreate Step:
- Have Unlisted/Excluded Account
- Create transaction (expense)
- Confirm and save transaction
- Transaction date recorded as tomorrow
Thank you @bharoar for raising Issue #3383! 🚀 What's next? Read our Contribution Guidelines 📚.
Tagging @ILIYANGERMANOV for review & approval 👀
I'm on it
Thank you for your interest @viratde! 🎉 Issue #3383 is assigned to you. You can work on it! ✅
If you don't want to work on it now, please un-assign yourself so other contributors can take it.
Also, make sure to read our Contribution Guidelines.
@bharoar Could you please share the screenshot of the process to reproduce the issue? I am not able to reproduce it
@bharoar Could you please share the screenshot of the process to reproduce the issue? I am not able to reproduce it
@viratde try changing the timezone of your device to some weird one (e.g. +12 or -12l
@ILIYANGERMANOV Thanks got it
@bharoar Could you please share the screenshot of the process to reproduce the issue? I am not able to reproduce it
@viratde try changing the timezone of your device to some weird one (e.g. +12 or -12l
Hey @ILIYANGERMANOV, The error is in the file RootActivity.kt line 198, and the error is because the time picker dialog is allowing the user to select a time in his timezone while that onTimePicked function is returning time in UTC.
There can be two solutions to this:-
- We store the time in the local timezone so that I can remove the function convertLocalToUtc from Rootactivity. kt file.
- We store the time in UTC. but wherever we show the date to the user, we refactor the date and time to the local timezone . But this refactoring will be needed all over the app codebase.
I just wanted to ask. Which one I should follow?
The proper fix would be:
- Store everything in UTC
- Only the UI layer will present local time (and convert local back to UTC when needed)
Use the TimeConverter API that I recently merged. We also need to create TimeFormatter in :shared:ui` following the same pattern