#NEWLINE# def to_timezone( dt , timezone ) : #NEWLINE# #INDENT# '\n    Return an aware datetime which is ``dt`` converted to ``timezone``.\n\n    If ``dt`` is naive, it is assumed to be UTC.\n\n    For example, if ``dt`` is "06:00 UTC+0000" and ``timezone`` is "EDT-0400",\n    then the result will be "02:00 EDT-0400".\n\n    This method follows the guidelines in http://pytz.sourceforge.net/\n    ' #NEWLINE# if ( dt . tzinfo is None ) : #NEWLINE# #INDENT# dt = dt . replace ( tzinfo = _UTC ) #NEWLINE# #UNINDENT# return timezone . normalize ( dt . astimezone ( dt ) )