Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'time_zone' instead of 'timezone' #67

Open
sergotail opened this issue Apr 7, 2021 · 2 comments
Open

'time_zone' instead of 'timezone' #67

sergotail opened this issue Apr 7, 2021 · 2 comments

Comments

@sergotail
Copy link

Hello!
Using your package I've encountered such bug: geoip()->getLocation($ip) returns an array with key time_zone, but in login event listener i found timezone key usage. Is this key depends on GeoIP service? I`m using IPGeolocation.

Environment:
PHP: 7.4.12
Laravel: 8
jamesmills/laravel-timezone: 1.9.3
torann/geoip: dev-master (downloaded today, 07.04.2021)

Maybe there is a problem in dependency, and i should rely on certain stable versions of torann/geoip? Latest stable version 3.0.2 differs from dev-master only in environment files like composer.json, so timezone key should have been changed earlier, i think.

Thanks!

@sergotail
Copy link
Author

sergotail commented Apr 7, 2021

I also debugged and found that because i'm testing package locally, my ip is 127.0.0.1, so i always get default location timezone.
But when i typed:

$ip = 'some.ip.from.my.city'; // $this->getFromLookup();

, $geoip_info holds an array with correct info and has key time_zone instead of timezone, so i always get null for my timezone.

@sergotail
Copy link
Author

Created PR #68 for this and for many other features. Sorry for multiple features in single PR, created it as a group of ideas for package.
Also i have a forked repo with all these changes: https://github.com/SEOService2020/laravel-timezone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant