def str_to_epoch_comments(rt_style_date_str): """ RT stores things as '2014-08-21 21:22:00' """ date = datetime.strptime(rt_style_date_str, "%Y-%m-%d %H:%M:%S") return int(float(util.datetime_to_epoch(date)))
def str_to_epoch(rt_style_date_str): """ RT stores things as 'Fri Aug 15 19:45:51 2014' """ date = datetime.strptime(rt_style_date_str, '%a %b %d %H:%M:%S %Y') return int(float(util.datetime_to_epoch(date)))