jamesmills / laravel-timezone

Enable user Timezones in your application.
MIT License
677 stars 91 forks source link

Added config option for overwriting database value #5

Closed micahhenshaw closed 4 years ago

micahhenshaw commented 5 years ago

Just asking if you would include an option to overwrite existing set timezones or not to.

jamesmills commented 5 years ago

Hi @micahhenshaw and thank you for your PR.

When would you intend to use this?

I assume you are wanting this so that if the user changes TimeZone (due to travelling or VPN) and the uses your application you don't want the system to update to use that new TimeZone. You want it to use the original TimeZone set when the user first signed in/up?

James

micahhenshaw commented 5 years ago

Hi @jamesmills

There are a few cases that came to mind, your suggestion with the VPN is definitely one of them, also being on mobile data often results in IP address that don't necessarily reflect an accurate location (not sure how well geoip handles that). Also in cases where we could use your package to setup the timezone and use it for converting etc but give the user the option to manually select a timezone, in which case you wouldn't want to overwrite it.

Thanks, Micah

jamesmills commented 4 years ago

Hi @micahhenshaw.

I'm so sorry. I totally forgot about this.

We should add this for sure. Can you add something to the README file to explain this configuration options. Then I will merge it and add it to the CHANGELOG.

Thank you!

micahhenshaw commented 4 years ago

Hi @jamesmills

No problems! I have updated the README file

Thanks