laravel-timezone icon indicating copy to clipboard operation
laravel-timezone copied to clipboard

Custom data source instead of users.timezone

Open nyalex opened this issue 5 years ago • 1 comments

In my apps, we do not store the timezone in users.timezone. We have a separate database table that stores various account-level settings, the timezone being only one of them. I suspect that others have similar implementations, or at the very least, a different column even.

With that, I'd like to make a suggestion. instead of mandating that we use users.timezone as the source of the user's timezone, allow for a model to return this information that can be customizable. Perhaps look in the User Eloquent model for a method with a specific naming convention (e.g. getUserTimezone())?

I am happy to contribute when I can - if you agree with my thinking.

nyalex avatar Apr 22 '20 10:04 nyalex

WIP

jamesmills avatar Feb 21 '21 13:02 jamesmills