stimfit
stimfit copied to clipboard
stf.set_recording_time misbehaving
Hi,
I just encountered this bug when trying to construct a recording object and to set the recording time.
In [1]: stf.set_recording_time('16:45:10')
Out[1]: True
In[2]: stf.get_recording_time()
Out[2]: '16:15:26'
Basically the minutes and the seconds aren't being set correctly.
I get the same behavior when using rec.date = '16:45:10'
Can you please test
stf.set_recording_time('16-45-10')
That works, thanks
@schloegl This looks like a problem with Recording::SetTime() Either sscanf only uses the first format string regardless of whether there are dashes or not, or alternatively strptime fails. I think you wrote this function (correct me if I'm wrong). Could you please look into this?