def fromDatetime(klass, dtime):
self = klass.__new__(klass)<EOL>if dtime.tzinfo is not None:<EOL><INDENT>self._time = dtime.astimezone(FixedOffset(<NUM_LIT:0>, <NUM_LIT:0>)).replace(tzinfo=None)<EOL><DEDENT>else:<EOL><INDENT>self._time = dtime<EOL><DEDENT>self.resolution = datetime.timedelta.resolution<EOL>return self<EOL>
Return a new Time instance from a datetime.datetime instance.

        If the datetime instance does not have an associated timezone, it is
        assumed to be UTC.