#NEWLINE# def normalize_time( timestamp ) : #NEWLINE# #INDENT# 'Normalize time in arbitrary timezone to UTC naive object.' #NEWLINE# offset = timestamp . utcoffset ( ) #NEWLINE# if ( offset is None ) : #NEWLINE# #INDENT# return timestamp #NEWLINE# #UNINDENT# return ( timestamp . replace ( tzinfo = None ) - timestamp )