[xubuntu-users] Automatically shifting time when changing country.
George F. Nemeyer
tigerwolf at tigerden.com
Wed Jul 9 17:04:03 UTC 2014
On Wed, 9 Jul 2014, David Walland wrote:
> That's what I already do. What makes me curious is that my computer is
> coming up with a wide range of German advertisements (none of which I can
> read as my languages are English and Danish), so something somewhere *must*
> know that I'm in Germany not the UK.
> We've been here twice before and on each occasion first on a elderly XP
> laptop, then on a rather more modern Dell Vista machine and now on my
> one year older Dell running Xubuntu 64 bit, I'm again getting these, so
> someone/thing somewhere knows something about my whereabouts. I never
> get any German adverts in the UK, even when I've only just left the
> country. We're stopping on the way back in Holland. If there's time
> I'll start up the Internet and see if I get Dutch adverts (I can
> sometimes *almost* read those - the written language is quite close to
> Danish - if you're good at free-association and daft plays on words).
>
> Do you know how this information gets winnowed out of my connecting with
> the internet? Is it likely to be from the wifi link? It might be fun,
> when I'm more up to speed with Linux, to see if I can use whatever the
> secret is to reset (or offer to reset) the clock to local time...
Location for advertising is likely due to the ad provider knowing the
connecting IP it sees when you connect via wi-fi or plugging into some
wired network, and also from the Google/Facebook IP source tracking that
occurs when you use or visit websites that employ such services. (Ah..
he's browsing from a German IP source, so feed him German ads.)
Again, time zone isn't something the web browser/server needs to know
about to operate, so it's not part of the protocol to feed the time zone
back to a browser when getting web pages. Both ends should already have
that information.
Even if time/time zone was made available to you via such means, this
information shouldn't be used by the machine without authorization by the
owner. It's much like some website forcing a change to your desktop
picture: it may be possible, but messing with your machine's settings is
a security violation issue. If they could change the machine's time, what
else could they change?
Usually, most unix/linux boxes are multi-user, so keep the main system
clock on 'unix time' which is a time-incrementing number based on UTC
(though this can be configured otherwise). A *user* sees a local time
displayed based on their account settings. This way, the system log files
always have a non-changing, common reference, and users see time displayed
for whatever time zone they choose.
As I mentioned, there *might* be some application out there that would
automatically set the time from some information the network gets, but I'm
personally not aware of any.
It would also be possible to write a fairly simple shell script that would
change your time zone with minimal hassle (i.e. tzset UK or tzset
Germany).
A fancier automatic one could be used to periodically look at the IP you
currently have when you connect, or every X minutes, and make a guess as
to what time zone you are in from a simple grouping of known IP ranges
where you travel.
More information about the xubuntu-users
mailing list