labstreaminglayer / App-LabRecorder

An application for streaming one or more LSL streams to disk in XDF file format.
MIT License
123 stars 45 forks source link

What does `created_at` field means? #69

Closed okt-wang closed 3 years ago

okt-wang commented 3 years ago

Hi all, I recorded some EEG data, and want to know actually file was created. Is this field created_at telling something about it? e.g. I got 495259.50215359998 in my *.xdf file, how do I convert it to a timestamp like 2021/8/24 10:32:02?

note: I have tried to parse it with unix_timestamp, but the result is not what I want.

cboulay commented 3 years ago

What version of LabRecorder are you using? Since about 13 months ago LabRecorder creates a datetime field in the header to indicate when the file was created:

https://github.com/labstreaminglayer/App-LabRecorder/blob/8cc317fe1e7769292f834549444453cad8c718bb/xdfwriter/xdfwriter.cpp#L37-L38

created_at indicates when the stream was created using lsl timestamps: https://github.com/sccn/xdf/wiki/Specifications#streamheader-chunk

It cannot be converted back to a wall clock datetime.

cboulay commented 3 years ago

I'm going to close this issue because there's nothing to be done. Feel free to continue the discussion if you have any more questions.