stimfit icon indicating copy to clipboard operation
stimfit copied to clipboard

stf.set_recording_time misbehaving

Open AndrewMicallef opened this issue 9 years ago • 3 comments

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'

AndrewMicallef avatar Nov 17 '15 22:11 AndrewMicallef

Can you please test

stf.set_recording_time('16-45-10')

neurodroid avatar Nov 17 '15 22:11 neurodroid

That works, thanks

AndrewMicallef avatar Nov 17 '15 22:11 AndrewMicallef

@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?

neurodroid avatar Nov 17 '15 23:11 neurodroid