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 |