def get_xml_updated(when,indent_tab=xmlFormat.DEFAULT_TAB,leading_tab=""): xml_updated={"UTC":{"unixtime":timeConversion.getSeconds(when), "ISO8601":timeConversion.getISO8601_UTC(when), "RFC2822":timeConversion.getRFC2822_UTC(when)}, "Local":{"ISO8601":timeConversion.getISO8601_Local(when), "RFC2822":timeConversion.getRFC2822_Local(when), "human":timeConversion.getHuman(when)}} return xmlFormat.dict2string(xml_updated, dict_name="updated",el_name="timezone", subtypes_params={"class":{}}, indent_tab=indent_tab,leading_tab=leading_tab)
def time2xml(the_time, outer_tag, indent_tab=DEFAULT_TAB, leading_tab=""): xml_data = {"UTC":{"unixtime":timeConversion.getSeconds(the_time), "ISO8601":timeConversion.getISO8601_UTC(the_time), "RFC2822":timeConversion.getRFC2822_UTC(the_time)}, "Local":{"ISO8601":timeConversion.getISO8601_Local(the_time), "RFC2822":timeConversion.getRFC2822_Local(the_time), "human":timeConversion.getHuman(the_time)}} return dict2string(xml_data, dict_name=outer_tag, el_name="timezone", subtypes_params={"class":{}}, indent_tab=indent_tab, leading_tab=leading_tab)