def localtime_to_utc(<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 localtime to UTC