0

I very well know that this has been asked quite a number of times here itself but folks please give this question a read. Plus I'm giving my best to phrase this question, hence the Prelude/Question sections.

Prelude:

GeoIP databases pre-built mappings of IP to it's geographic location. There is no assurance that they are accurate, right? i.e. IANA gives out IP blocks to various RIRs, say APNIC. And, APNIC can give out IPs to anyone in any part of the world; not only to the Asia Pacific region. So there is no certainty to the accuracy of Geo-IP mapping that exists as of now.

Questions:

1.

Given this uncertainty how do big websites, like Facebook and Google deal with this? I'm specifically talking about "Timestamps" they give to our emails/messages. Wouldn't they be guessing our location, and hence, the time-zone from the accessing-IP? Say, when I access gmail by connecting to a VPN located in Canada, my mails are stamped with ETC. When I connect to one in US, it's stamped with Pacific Time Zone. Given the uncertainty mentioned earlier, isn't there a huge chance that they'd provide erroneous timestamps right? But honestly, I've never seen that happen, ever.

How would we explain the fact that they show accurate time zones always and never go wrong?

2.

This might be similar to (1), please excuse if so.

I have remote access to a server registered with an IP address belonging to US registry. But it's geographically located in a DC in Tokyo. If by some mechanism I'm accessing my gmail inbox through this server (a remote X-session maybe?).

What time zone would I be seeing on my mails?

Update on Question:

(You may even ignore the previous 'Question' sections (1) and (2) )

With Iain's reply I realized that the answer I was looking for was to - "How websites provide geo-located web experience to users" For eg, the visitors from Canada would be redirected to google.ca, those from India to google.co.in and so forth. Languages are even set according to geolocations.

So if I am to start a website requiring to deliver users with geolocated experience, I'd have to rely on geo-ip databases like MaxMind. So I'll still have chances for errors, right? And sites like Google and Facebook are able to maintain their accuracy in geo-ip due to their immense resourcefulness of their services and the way they collect data from end users, right?

user492160
  • 139
  • 1
  • 3
  • 11

4 Answers4

3

Whilst there is no guarantee as to the accuracy of a Geolocated IP address, they are typically more accurate that you appear to think. The rest of your question is kind of moot because of this. Equally you are assuming that geolocated IP addresses are used to display time information which may not always be the case.

Say, when I access gmail by connecting to a VPN located in Canada, my mails are stamped with ETC. When I connect to one in US, it's stamped with Pacific Time Zone.

Gmail doesn't do this. GMail uses the timezone offset settings of the computer you are using, not the geolocated IP address that you connect from. Facebook does the same. This is easy to test.

It follows from above that when using a remote computer in Tokyo, GMail will display the time in Tokyo if the timezone of the system is set for Tokyo.

Whilst GMail doesn't use the geolocated IP address you connect from to set the date for your emails, other services do use it to provide you with a geolocated experience. For example, Google search will provide you with a geolocated service.

user9517
  • 115,471
  • 20
  • 215
  • 297
  • thanks this cleared off section (2). Now I realize that the explanation I was looking for was - "How websites provide users with geolocated experience" -- like re-directing visitors from Spain to http://www.website.com/es, those from Japan to http://www.website.com/jp sections of their respective websites. I was looking for this explanation indeed, but some where later the mail-timestamp thing caught up. thanks. – user492160 Jan 01 '14 at 14:12
  • `GMail uses the timezone settings of the computer you are using` - I was under the impression that it determined the timezone offset (e.g. +0100), NOT the timezone (.e. Europe/Lisbon). – symcbean Jan 01 '14 at 16:59
1

Very interesting question. I'm not overly familiar with Gmail, so I'll provide a partial background:

Rfc 2822 - Internet Message Format states:

"3.3. Date and Time Specification

Date and time occur in several header fields.  This section specifies the syntax
for a full date and time specification.

[...]

The day is the numeric day of the month.  The year is any numeric year 1900
or later.

The time-of-day specifies the number of hours, minutes, and optionally seconds
since midnight of the date indicated.

The date and time-of-day SHOULD express local time.

The zone specifies the offset from Coordinated Universal Time (UTC, formerly
referred to as "Greenwich Mean Time") that the date and time-of-day represent."

So each mailserver will add to each passing mail a header value with the time according to that server and the offset to UTC.

The client subsequently looks at the timestamp added by its own mail host and reinterprets this according to the timezone the client itself has been configured to.

If ip address geolocation is also used, this would fall outside of the Internet Message Format specification. I myself have never seen geolocation used by an email client/server setup but would be interested to hear if anyone else has.

ErikE
  • 4,746
  • 1
  • 20
  • 27
1

Prelude: This is rather a discussion starter than a real answer. Not actually answering the technical aspect of the question, I believe it may give an insight to why the GeoIP or similar service isn't that important to the big players.

Google and Facebook, two service providers mentioned in the question, are by far the most wide- and deep-spread companies of the interwebs. If there is a company wit a sort of reliable knowledge base about where do its clients connect from, these are the hottest candidates.

Facebook

Have you noticed how many people add all sorts of geo-related stuff to all their posts? And how Facebook always asks you to add address or position to whatever you post? People willingly giving out correct info about their whereabouts is the best source of basis, upon which any good statistical method can base accurate-like assumptions.

Google

Google is everywhere - not only with the visible services they provide through the browser window. Take the omnipresent Android phones, tablets and plethora of other gadgets, asking you to provide your position (with anonymity promise - well in this case why not, they only need the combo of IP-related stuff and your position). And the Ads and Analytics services, providing a very valuable link between websites scattered all over the globe, their users and ... yes, any sort of position info available. You don't really have to spy on people, having such a good and widespread set of services makes it easier to add the necessary two plus two in the Google math-brain-campus.

Pavel
  • 141
  • 3
  • so you mean to say it's from the numerous services they provide and the information they collect from users, which enable them to maintain their geo-ip information to this accuracy level? --thanks. – user492160 Jan 01 '14 at 14:15
  • Yes, that's it. It's only my imagination based on scattered pieces of information I happened to read here and there. By no means I can prove that this is really how they do it. I would imagine that this topic belongs to the _dearest secrests_ category. – Pavel Jan 02 '14 at 14:15
1

You seem confused about how how registries work. It is possible that a IP address range (note that we're talking about addresses here - not IP names which are very different) can be maintained by a registrar with a different geography - but this is extremely rare - since this is also the source of information about to route packets to the network.

If you look at a whois record then you'll see it contains the ISO-3166 code for the country. e.g.

[colin@localhost ~]$ whois 82.13.151.104
% This is the RIPE Database query service.

[snip]

inetnum:        82.13.144.0 - 82.13.175.255
netname:        INFRASTRUCTURE
descr:          NTL Infrastructure - Watford
country:        GB
admin-c:        NNMC1-RIPE
tech-c:         NNMC1-RIPE
status:         ASSIGNED PA
mnt-by:         AS5089-MNT
remarks:        INFRA-AW
source:         RIPE # Filtered

It's possible to divine further information about the location of an IP address based on the traceroute information - latency is an indicator of distance - and it should get progressively closer (geographically) to the target).

But if my only objective were to display time at the client, then I wouldn't use this approach (except as a fallback) - javascript knows how to convert a UTC/GMT time into the local time zone (although it doesn't actually disclose what that timezone is - at least not explicitly).

Further, if you have access to javascript, then you can use the geolocation API to get a more precise location.

symcbean
  • 21,009
  • 1
  • 31
  • 52