Roskus / prospero-flow-crm

Prospero Flow CRM CE (Community Edition) bassed in Laravel 10, multilingual, multi company.
https://prosperoflow.com
MIT License
51 stars 21 forks source link

issue with time zones in notifications. #191

Open elguitarraverde opened 1 year ago

elguitarraverde commented 1 year ago

We can implement some Accessors & Mutators as I did in the calendar. In this way, the dates are always saved in the database in UTC(or config('app.timezone')) and when the user reads them, they are transformed into their timezone.

https://github.com/Roskus/prospect-flow-crm/blob/56c096918f24beadb6ed63a5cb528d61401511c9/app/Models/Calendar.php#L59-L73

gnovaro commented 1 year ago

Can be useful but we need to modify the command for send the notification taking in consideration the timezone of the company i guess. In the contact reminder we can use this also we can move to a trait and reuse

elguitarraverde commented 1 year ago

we can study the way to do it by monicahq

https://github.com/monicahq/monica/blob/main/app/Helpers/DateHelper.php

refactor: https://github.com/monicahq/chandler/blob/main/app/Helpers/DateHelper.php