'Respond to a request for the local time.
The time is taken from self.local_time(), which may be replaced
during plugin configuration with a function that maps JIDs to
times.
Arguments:
iq -- The Iq time request stanza.'

def _handle_time_request(self, iq):

    if (iq['type'] == 'get'):
        iq.reply()
        iq['entity_time']['time'] = self.local_time(iq['to'])
        iq.send()
