def to_utc(some_time):
<EOL>if some_time.tzinfo and some_time.utcoffset():<EOL><INDENT>some_time = some_time.astimezone(tzutc())<EOL><DEDENT>return some_time.replace(tzinfo=None)<EOL>
Convert the given date to UTC, if the date contains a timezone.

Parameters
----------
some_time : datetime.datetime
    datetime object to convert to UTC

Returns
-------
datetime.datetime
    Converted datetime object