#NEWLINE# def timestamp_to_datetime( timeStamp , localized = True ) : #NEWLINE# #INDENT# ' Converts a UTC timestamp to a datetime.datetime.' #NEWLINE# ret = datetime . datetime . utcfromtimestamp ( timeStamp ) #NEWLINE# if localized : #NEWLINE# #INDENT# ret = localize ( ret , pytz . utc ) #NEWLINE# #UNINDENT# return timeStamp