From: Jon M. <des...@gm...> - 2005-05-09 05:55:49
|
Hi everyone, I had a look at Steven Garrity's idea for a 'Buddy's Time' plugin <http://www.actsofvolition.com/archives/2004/december/apluginideafor>, and I was wondering what the best way of implementing it would be. Basically, it displays the local time for whoever you're talking to somewhere in the conversation window. I can think of two ways of getting the user's time information: Either 1. Query their location and work out their timezone from that 2. Have them run a plugin that responds to special 'hey, what time is it over there' messages The plugin would also provide the ability to add a selected buddy's timezone information yourself, if they choose not to publish it (and, of course, you know their timezone already). The first option has the problem of getting, parsing and working out the location information, and then working out which timezone we're talking about (Perth, Scotland is quite different to Perth, Australia). The second option has the problem of only working with other Gaim users who are running the plugin, and an autoresponder may expose security vulnerabilities. Also, how should the timezone information be stored locally? Jon |
From: Richard L. <rl...@wi...> - 2005-05-09 06:37:43
|
On Mon, 2005-05-09 at 14:55 +1000, Jon Manning wrote: > 1. Query their location and work out their timezone from that > 2. Have them run a plugin that responds to special 'hey, what time is > it over there' messages > > The plugin would also provide the ability to add a selected buddy's > timezone information yourself, if they choose not to publish it (and, > of course, you know their timezone already). While I personally have no use for such a plugin, I have some thoughts on how it might be implemented. Take all this with a grain of salt as it's late and I should be asleep instead of trying to think. :-) The timezone to display would be determined by this priority order: 1. The timezone returned by their copy of the plugin (if this is implemented). See plugins like gaim-encryption for ways to sneak extra data through IM messages. 2. The timezone set manually. 3. The timezone obtained via their IP address (using that GeoIP database or whatever it's called). (Obviously, this is only useful when their IP address can be obtained.) 4. The timezone obtained by parsing something like their city in their profile (however that's stored per-protocol). > Also, how should the timezone information be stored locally? Gaim has functions that plugins can use to store a preference on a blist node. You'd just use one of these and store it as an integer (as a Unix time value). You'd probably cache a timezone value and use that in the future if you couldn't obtain a new timezone. Some sort of indication would be provided (be it a different color or italics or whatever) to show that you were using a cached value instead of a recently updated one. You might also show that indicator (or another one) for timezones that were obtained via parsing static data like their profile. Perhaps you'd have some color coding of how reliable it was (green for the first on down to red for a cached copy). Richard Laager |
From: Tom W. <to...@to...> - 2005-05-11 21:24:00
|
On Mon, 2005-05-09 at 01:37 -0500, Richard Laager wrote: > On Mon, 2005-05-09 at 14:55 +1000, Jon Manning wrote: > > 1. Query their location and work out their timezone from that > > 2. Have them run a plugin that responds to special 'hey, what time is > > it over there' messages > >=20 > > The plugin would also provide the ability to add a selected buddy's > > timezone information yourself, if they choose not to publish it (and, > > of course, you know their timezone already). >=20 > While I personally have no use for such a plugin, I have some thoughts > on how it might be implemented. Take all this with a grain of salt as > it's late and I should be asleep instead of trying to think. :-) >=20 > The timezone to display would be determined by this priority order: >=20 <snip> > 3. The timezone obtained via their IP address (using that GeoIP database > or whatever it's called). (Obviously, this is only useful when their IP > address can be obtained.) >=20 Just a point - this is not always accurate, especially with satellite broadband connections. For example, Aramiska UK customers are shown as being in Belgium. <sip> --=20 Tom Wesley <to...@to...> |
From: Richard L. <rl...@wi...> - 2005-05-11 19:40:19
|
On Wed, 2005-05-11 at 20:27 +0100, Tom Wesley wrote: > On Mon, 2005-05-09 at 01:37 -0500, Richard Laager wrote: > > 3. The timezone obtained via their IP address (using that GeoIP database > > or whatever it's called). (Obviously, this is only useful when their IP > > address can be obtained.) > > > > Just a point - this is not always accurate, especially with satellite > broadband connections. For example, Aramiska UK customers are shown as > being in Belgium. Sure. That's why I listed this as #3 and the manual setting as #2. When you know it's wrong, you can override it. Richard Laager |