spliit icon indicating copy to clipboard operation
spliit copied to clipboard

[BUG] Incorrect date displayed in the expenses

Open corphiloscience opened this issue 1 year ago • 4 comments

Issue: When i create a new expense with a date as August 1st it displays July 31st in the expenses list.

Expected: It should display the expense date that was given as August 1st and not one day before

Steps to reproduce: Create new expense with date in the past See date in the expenses list

Screenshot 2024-12-21 164450 Screenshot 2024-12-21 164500

corphiloscience avatar Dec 21 '24 21:12 corphiloscience

I just installed and used the app for the first time, noticing this. It might have to do with a timezone mishandling.

Hi @scastiel. As a data integrity issue, can we get this prioritized, please? Thank you!

dverbru avatar Jul 12 '25 13:07 dverbru

Same issue. Date is written correctly in Database but then the client is using the browser/system timezone to display the info. The expense date is considered written with UTC so if you live in a Timezone west of UTC, it will display one day prior.

If I change my own TimeZone to UTC, I do see the date displayed correctly.

So either it needs to be forced to display "as is" or the formatting could be change to datetime with timezone so it will display the date accordingly.

omelettedufromagee avatar Jul 15 '25 01:07 omelettedufromagee

Client should be displaying the date in their timezone IMO. Easy to convert from UTC to another timezone. So maybe that part is missing.

corphiloscience avatar Jul 16 '25 20:07 corphiloscience

To do that, the date would have to be stored in the database as a datetime with timezone or in UTC with the time (not only the date). Right now, if you choose as a date 2025-07-01. It will write 2025-07-01 in the database.

Then date.toLocaleString will write it as: 2025-06-30 20:00:00 if you live in EDT TimeZone and will short it to 2025-06-30.

Mostly, this issue only affect people living "negative" GMT TimeZones.

omelettedufromagee avatar Jul 16 '25 21:07 omelettedufromagee