Is it possible to use the same tool to have Ubuntu guess what timezone it is currently in?
This article mentions the feature I'm looking for (just above the second pic): http://www.linuxforu.com/2012/05/ubuntu-12-04-precise-pangolin-review/
Is it possible to use the same tool to have Ubuntu guess what timezone it is currently in?
This article mentions the feature I'm looking for (just above the second pic): http://www.linuxforu.com/2012/05/ubuntu-12-04-precise-pangolin-review/
Ubuntu uses the
ubuntu-geoip
package, which queries http://geoip.ubuntu.com/.You can
python-geoip
to achieve the same thing:Sadly, it doesn't work with ipv6 yet.
I decided to download the ubiquity source and dig for it. Greping timezone found the concerned lines, which issue the command:
and parse the resulting xml.
Rather than load up python or something else, I just wrote a quick bash script that grabs the xml and yanks the timezone out with sed:
I believe that it uses your internet connection & ip address to find that information. When I have installed offline it always asks you to select a timezone.