def utc_to_localtime(<EOL>date_str,<EOL>fmt="<STR_LIT>",<EOL>input_fmt="<STR_LIT>"):
date_struct = datetime.strptime(date_str, input_fmt)<EOL>date_struct += timedelta(hours=get_dst(date_struct))<EOL>date_struct -= timedelta(seconds=time.timezone)<EOL>return strftime(fmt, date_struct)<EOL>
Convert UTC to localtime

Reference:
 - (1) http://www.openarchives.org/OAI/openarchivesprotocol.html#Dates
 - (2) http://www.w3.org/TR/NOTE-datetime

This function works only with dates complying with the
"Complete date plus hours, minutes and seconds" profile of
ISO 8601 defined by (2), and linked from (1).

Eg:    1994-11-05T13:15:30Z