<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def formatTime (self, record, datefmt=None):
 """Returns the creation time of the given LogRecord as formatted text. NOTE: The datefmt parameter and self.converter (the time conversion method) are ignored. BSD Syslog Protocol messages always use local time, and by our convention, Syslog Protocol messages use UTC. """

        if self.bsd:
            lt_ts = datetime.datetime.fromtimestamp(record.created)
            ts = lt_ts.strftime(self.BSD_DATEFMT)
            if ts[4] == '0':
                ts = ts[0:4] + ' ' + ts[5:]
        else:
            utc_ts = datetime.datetime.utcfromtimestamp(record.created)
            ts     = utc_ts.strftime(self.SYS_DATEFMT)
        return ts