'A hook to control how times are formatted.
Can be overridden at the ``Serializer`` level (``datetime_formatting``)
or globally (via ``settings.TASTYPIE_DATETIME_FORMATTING``).
Default is ``iso-8601``, which looks like "03:02:14".'

def format_time(self, data):

    if (self.datetime_formatting == u'rfc-2822'):
        return format_time(data)
    if (self.datetime_formatting == u'iso-8601-strict'):
        data = (datetime.datetime.combine(datetime.date(1, 1, 1), data) - datetime.timedelta(microseconds=data.microsecond)).time()
    return data.isoformat()
