jamesmills / laravel-timezone

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

Updating wrong timezone automatically add manual feature #77

Open thedevsbuddy opened 2 years ago

thedevsbuddy commented 2 years ago

Please add a feature to stop updating timezone automatically and let the user set their timezone manually if they want. because if we are logging in every time it is setting the timezone which is wrong.

boryn commented 2 years ago

There is already this option in timezone.php, use 'overwrite' => false,.

Setting the timezone manually is, IMHO out of scope of this library. You should implement it by yourself e.g. in the user profile settings.

hyphen81 commented 1 year ago

I'm experiencing this issue as well and wondering why it's not correctly identifying the timezone? Is that an issue with the underlying geoip package or what? I'm in America/Chicago and it keeps changing it to America/New_York. I guess I'll just set the overwrite to false and manage it in my app, but I liked the idea of it identifying it.

hyphen81 commented 1 year ago

I would also say, that I just happened to stumble upon this issue and realized the timezone is not reliably identified. With the near PTSD level trauma I have from dealing with timezones, this could really contribute to a lot of mental breakdowns among users of this package. (I'm being hyperbolic of course). But I would never go back and check the timezone to make sure it didn't change, when I initially set it to the correct one. What I'm getting at, is maybe setting overwrite to false as the default, or putting some notes in the docs about this behavior. I apologize if it's already in the docs, but I don't recall seeing anything about it. Granted I didn't go so deep as to read the docs for the underlying geoip package, so ignore me if I'm just an ignorant fool, spouting off on the internet. Just my humble thoughts.

Also, great package, thank you very much for this. It's a lifesaver.

hyphen81 commented 1 year ago

To anyone else that might be dumb like me....just took a peak at the geoip config file and it has a default location for localhost, which is set to America/New_York, hence why it was updating mine incorrectly. After changing the config setting in geoip config, it's working as intended.