def get_traffic_dates(thing):
 now = datetime.datetime.now(g.tz).replace(minute=0, second=0, microsecond=0)
 (start, end) = get_total_run(thing)
 end = min(now, end)
 return (start, end)

def get_traffic_dates ( thing ) : now = datetime . datetime . now ( g . tz ) . replace ( minute = 0 , second = 0 , microsecond = 0 ) ( start , end ) = get_total_run ( thing ) end = min ( now , end ) return ( start , end )
retrieve the start and end of a promoted link or promocampaign .