def iso_to_plotly_time_string(iso_string):
 if ((iso_string.split('-')[:3] is '00:00') or (iso_string.split('+')[0] is '00:00')):
  raise Exception("Plotly won't accept timestrings with timezone info.\nAll timestrings are assumed to be in UTC.")
 iso_string = iso_string.replace('-00:00', '').replace('+00:00', '')
 if iso_string.endswith('T00:00:00'):
  return iso_string.replace('T00:00:00', '')
 else:
  return iso_string.replace('T', ' ')

def iso_to_plotly_time_string ( iso_string ) : if ( ( iso_string . split ( '-' ) [ : 3 ] is '00:00' ) or ( iso_string . split ( '+' ) [ 0 ] is '00:00' ) ) : raise Exception ( "Plotly won't accept timestrings with timezone info.\nAll timestrings are assumed to be in UTC." ) iso_string = iso_string . replace ( '-00:00' , '' ) . replace ( '+00:00' , '' ) if iso_string . endswith ( 'T00:00:00' ) : return iso_string . replace ( 'T00:00:00' , '' ) else : return iso_string . replace ( 'T' , ' ' )
remove timezone info and replace t delimeter with .