laravel-timezone
laravel-timezone copied to clipboard
'time_zone' instead of 'timezone'
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!
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.
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