def mpl_dates_to_datestrings(dates, mpl_formatter):
 _dates = dates
 if (mpl_formatter == 'TimeSeries_DateFormatter'):
  try:
   dates = matplotlib.dates.epoch2num([(((date * 24) * 60) * 60) for date in dates])
   dates = matplotlib.dates.num2date(dates, tz=pytz.utc)
  except:
   return _dates
 else:
  try:
   dates = matplotlib.dates.num2date(dates, tz=pytz.utc)
  except:
   return _dates
 time_stings = [' '.join(date.isoformat().split('+')[0].split('T')) for date in dates]
 return time_stings

def mpl_dates_to_datestrings ( dates , mpl_formatter ) : _dates = dates if ( mpl_formatter == 'TimeSeries_DateFormatter' ) : try : dates = matplotlib . dates . epoch2num ( [ ( ( ( date * 24 ) * 60 ) * 60 ) for date in dates ] ) dates = matplotlib . dates . num2date ( dates , tz = pytz . utc ) except : return _dates else : try : dates = matplotlib . dates . num2date ( dates , tz = pytz . utc ) except : return _dates time_stings = [ ' ' . join ( date . isoformat ( ) . split ( '+' ) [ 0 ] . split ( 'T' ) ) for date in dates ] return time_stings
convert matplotlib dates to iso-formatted-like time strings .