Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #208421 > unrolled thread

Get the timezone from an IP address

Started byAndré Rodier <andre@rodier.me>
First post2019-05-08 21:00 +0200
Last post2019-05-08 21:40 +0200
Articles 8 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Get the timezone from an IP address André Rodier <andre@rodier.me> - 2019-05-08 21:00 +0200
    Re: Get the timezone from an IP address Mindaugas Celiesius <m.celiesius@yandex.ru> - 2019-05-08 21:00 +0200
      Re: Get the timezone from an IP address André Rodier <andre@rodier.me> - 2019-05-08 21:40 +0200
        Re: Get the timezone from an IP address Michael Stone <mstone@debian.org> - 2019-05-08 22:50 +0200
    Re: Get the timezone from an IP address Darac Marjal <mailinglist@darac.org.uk> - 2019-05-08 21:10 +0200
      Re: Get the timezone from an IP address André Rodier <andre@rodier.me> - 2019-05-08 21:40 +0200
    Re: Get the timezone from an IP address Michael Stone <mstone@debian.org> - 2019-05-08 21:10 +0200
      Re: Get the timezone from an IP address André Rodier <andre@rodier.me> - 2019-05-08 21:40 +0200

#208421 — Get the timezone from an IP address

FromAndré Rodier <andre@rodier.me>
Date2019-05-08 21:00 +0200
SubjectGet the timezone from an IP address
Message-ID<xVzXj-48E-1@gated-at.bofh.it>
Hi,

Is there any way - or Debian package - to know the timezone from an IP
address, or at least from a country? I have successfully used the geoip
databases to get the country, so I could use the main city as an
approximation.

I would prefer to do this offline, though.

Thanks for your insights.

-- 
André

[toc] | [next] | [standalone]


#208422

FromMindaugas Celiesius <m.celiesius@yandex.ru>
Date2019-05-08 21:00 +0200
Message-ID<xVzXj-48E-3@gated-at.bofh.it>
In reply to#208421
Did you check this?
https://packages.debian.org/stretch/geoip-bin

> Hi,
> 
> Is there any way - or Debian package - to know the timezone from an IP
> address, or at least from a country? I have successfully used the geoip
> databases to get the country, so I could use the main city as an
> approximation.
> 
> I would prefer to do this offline, though.
> 
> Thanks for your insights.
> 
> --
> André
Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ A dumb species has no way to open a tuna can.
⢿⡄⠘⠷⠚⠋⠀ A smart species invents a can opener.
⠈⠳⣄⠀⠀⠀⠀ A master species delegates.

[toc] | [prev] | [next] | [standalone]


#208427

FromAndré Rodier <andre@rodier.me>
Date2019-05-08 21:40 +0200
Message-ID<xVAA2-4C1-5@gated-at.bofh.it>
In reply to#208422
On Wed, 2019-05-08 at 21:57 +0300, Mindaugas Celiesius wrote:
> Did you check this?
> https://packages.debian.org/stretch/geoip-bin
> 
> > Hi,
> > 
> > Is there any way - or Debian package - to know the timezone from an IP
> > address, or at least from a country? I have successfully used the geoip
> > databases to get the country, so I could use the main city as an
> > approximation.
> > 
> > I would prefer to do this offline, though.
> > 
> > Thanks for your insights.
> > 
> > --
> > André
> 
> Meow!

Yes, this is the one I use, bit it does not give the timezone.

Thanks any way!

André

[toc] | [prev] | [next] | [standalone]


#208431

FromMichael Stone <mstone@debian.org>
Date2019-05-08 22:50 +0200
Message-ID<xVBFL-5eD-5@gated-at.bofh.it>
In reply to#208427
On Wed, May 08, 2019 at 08:34:36PM +0100, André Rodier wrote:
>On Wed, 2019-05-08 at 21:57 +0300, Mindaugas Celiesius wrote:
>> Did you check this?
>> https://packages.debian.org/stretch/geoip-bin
>>
>> > Hi,
>> >
>> > Is there any way - or Debian package - to know the timezone from an IP
>> > address, or at least from a country? I have successfully used the geoip
>> > databases to get the country, so I could use the main city as an
>> > approximation.
>> >
>> > I would prefer to do this offline, though.
>> >
>> > Thanks for your insights.
>> >
>> > --
>> > André
>>
>> Meow!
>
>Yes, this is the one I use, bit it does not give the timezone.

Note that by default it isn't granular enough to locate the IP with 
enough accuracy to determine TZ within a country.

[toc] | [prev] | [next] | [standalone]


#208423

FromDarac Marjal <mailinglist@darac.org.uk>
Date2019-05-08 21:10 +0200
Message-ID<xVA6Z-4rD-1@gated-at.bofh.it>
In reply to#208421
On 08/05/2019 19:43, André Rodier wrote:
> Hi,
>
> Is there any way - or Debian package - to know the timezone from an IP
> address, or at least from a country? I have successfully used the geoip
> databases to get the country, so I could use the main city as an
> approximation.
>
> I would prefer to do this offline, though.
>
> Thanks for your insights.
>

Some part of my brain said that the timezone database holds this
information, but it may not do so directly. Here's some suggestions from
IANA, though.

https://data.iana.org/time-zones/tz-link.html#boundaries

[toc] | [prev] | [next] | [standalone]


#208429

FromAndré Rodier <andre@rodier.me>
Date2019-05-08 21:40 +0200
Message-ID<xVAA2-4C1-9@gated-at.bofh.it>
In reply to#208423
On Wed, 2019-05-08 at 20:07 +0100, Darac Marjal wrote:
> On 08/05/2019 19:43, André Rodier wrote:
> > Hi,
> > 
> > Is there any way - or Debian package - to know the timezone from an IP
> > address, or at least from a country? I have successfully used the geoip
> > databases to get the country, so I could use the main city as an
> > approximation.
> > 
> > I would prefer to do this offline, though.
> > 
> > Thanks for your insights.
> > 
> 
> Some part of my brain said that the timezone database holds this
> information, but it may not do so directly. Here's some suggestions from
> IANA, though.
> 
> https://data.iana.org/time-zones/tz-link.html#boundaries
> 

Thank you, I will have a look to this.

[toc] | [prev] | [next] | [standalone]


#208424

FromMichael Stone <mstone@debian.org>
Date2019-05-08 21:10 +0200
Message-ID<xVA6Z-4rD-3@gated-at.bofh.it>
In reply to#208421
On Wed, May 08, 2019 at 07:43:58PM +0100, André Rodier wrote:
>Is there any way - or Debian package - to know the timezone from an IP
>address, or at least from a country? I have successfully used the geoip
>databases to get the country, so I could use the main city as an
>approximation.
>
>I would prefer to do this offline, though.

You can get a guess on lat/lon for an IP and then get the TZ for the 
coordinates. Lots of options there, e.g.:
https://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates

[toc] | [prev] | [next] | [standalone]


#208428

FromAndré Rodier <andre@rodier.me>
Date2019-05-08 21:40 +0200
Message-ID<xVAA2-4C1-3@gated-at.bofh.it>
In reply to#208424
On Wed, 2019-05-08 at 15:03 -0400, Michael Stone wrote:
> On Wed, May 08, 2019 at 07:43:58PM +0100, André Rodier wrote:
> > Is there any way - or Debian package - to know the timezone from an IP
> > address, or at least from a country? I have successfully used the geoip
> > databases to get the country, so I could use the main city as an
> > approximation.
> > 
> > I would prefer to do this offline, though.
> 
> You can get a guess on lat/lon for an IP and then get the TZ for the 
> coordinates. Lots of options there, e.g.:
> https://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates
> 

Thanks, I will check this as well, a lot of links!

-- 
André

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web