it-volunteers-ukraine / ChariERP

0 stars 0 forks source link

Date of registration of the organization is entered into the database incorrectly #272

Closed KatyPupa closed 6 days ago

KatyPupa commented 1 month ago

Environment Desktop

OS: macOS Sonoma 14.5 Browser Safari Version 17.5

Pre-conditions https://chari-erp-dev-5jqgv.ondigitalocean.app/sign-up is opened.

Description

Date of registration of the organization is entered into the database incorrectly (One day earlier).

Steps to reproduce

  1. Fill out the registration form with valid data.
  2. In the Organization Registration Date field, enter the date 01. 01. 2023.
  3. Send the registration form.
  4. Compare the date of registration on the site and in the Mongo database.

Actual results Registration date on the site - 01. 01. 2023 Registration date in the Mongo database - 31. 12. 2022

Expected results All data on the site and in the database must be the same.

Screenshots

Знімок екрана 2024-10-15 о 16 00 19 Знімок екрана 2024-10-15 о 15 59 06
Wolshebnik commented 2 weeks ago

Maybe Roma fixed that.

KatyPupa commented 2 weeks ago

Not fixed yet.

Image

Image

rpkyrych commented 5 days ago

@KatyPupa I've applied a code fix, but I still can't get the date to be stored in the GMT +03:00 zone (Kyiv). That was the last thing I could apply and hope the bug will be fixed.

Previously I set that timezone directly into Mongo: Image

I also tried to set timezone directly as the environment variable, according to the documentation: https://docs.digitalocean.com/products/app-platform/how-to/manage-time-zone/

Image but that didn't help as well.

The final solution for the problem that remains - is to set the timezone directly in the code for each specific save or update of related entities, but that would require more effort compared to the end benefits of the date display in Mongo.

@olha-kyr FYI

KatyPupa commented 1 day ago

Unfortunately.....Image Image

KatyPupa commented 1 day ago

{"organizationData.dateOfRegistration": {"$gte": ISODate("2019-01-01T00:00:00Z"), "$lt": ISODate("2020-01-01T00:00:00Z")}} The request will return all documents registered during 2019. But we will not see in this list organizations registered on the 01st of the year. Since these statistics are relevant only for Super Admin, it is possible to postpone the solution of this problem.