'Parse an optional metadata key containing a time: if present, complain
if it doesn\'t parse.
Return None if not present or invalid.'

def from_json(self, field):

    if (field is None):
        return field
    elif (field is ''):
        return None
    elif isinstance(field, basestring):
        return self._parse_date_wo_default_month_day(field)
    elif isinstance(field, (int, long, float)):
        return datetime.datetime.fromtimestamp((field / 1000), UTC)
    elif isinstance(field, time.struct_time):
        return datetime.datetime.fromtimestamp(time.mktime(field), UTC)
    elif isinstance(field, datetime.datetime):
        return field
    else:
        msg = "Field    {0}    has    bad    value    '{1}'".format(self.name, field)
        raise TypeError(msg)
