Order Tray | Contact Us | Home | SIG Lists

[aprssig] guessed time zone using aprs.fi

Heikki Hannikainen hessu at hes.iki.fi
Sat Sep 13 20:28:54 UTC 2008


   Hi,

On Fri, 12 Sep 2008, Gord wrote:
> How does one change the guessed time zone for those areas for which the guessed time
> zone is incorrect when using the feature in aprs.fi?

On Sat, 13 Sep 2008, Art Alto wrote:

> When that happens on to me, the only way I have been able to fix it is to delete all
> cookies and restart the browser.

   That'll only make aprs.fi retry guessing the timezone. For some areas, 
the guessing code simply guesses wrong. It works just fine for most 
people, and for some, it always gets it wrongs. It thinks everyone working 
for Nokia (Corporation) are actually located in the city of Nokia, 
Finland.

   Currently the only real option is to select UTC on aprs.fi, which, of 
course, does not really fix the problem. I should do a proper "pick any 
timezone" selection, like openaprs has (it's actually been "half done" for 
about a year now - I have the timezones database loaded in already).

   The complication here is that the *some* of the time formatting happens 
on the client computer's side (in the Javascript code which runs on your 
web browser). Over there I can practically only select between UTC and the 
local time as decided by your web browser / operating system. There are no 
javascript localtime conversion functions which would take an arbitrary 
timezone definition (at least I couldn't find them :), and it'd be a pain 
to reimplement them with the DST stuff and everything. The "guessed" local 
time will be whatever you have selected in your operating system.

   So, to do arbitrary timezone selection properly, I'll have to move all 
of the localtime conversions from the client-side code to the server side, 
and that'll make things marginally slower for everyone. Now the server is 
just giving Unix-style timestamp integers (seconds since 1.1.1970 00:00:00 
UTC [1]) to everyone who is looking at the real-time map, and the web 
browser gets to do the localtime conversion when it's needed. If your 
operating system knows your proper timezone, you'll notice that the 
real-time map view (the target info balloons etc.) gets it just right.

   Yes, I'm going to do this eventually. The performance hit is marginal, 
it'll just eat a bit more memory on the web browser's side (to store the 
text strings for the timestamps instead of small integers), and a bit more 
CPU on the server side (to do the conversions for everyone). I'm trying to 
keep track of all of these and gain a little bit of extra performance 
everywhere I can, to keep things running quickly.

[1]: http://en.wikipedia.org/wiki/Unix_time

   - Hessu, OH7LZB





More information about the aprssig mailing list