sigmf / sigmf-python

Easily interact with Signal Metadata Format (SigMF) recordings.
https://sigmf.org
GNU Lesser General Public License v3.0
42 stars 16 forks source link

utils: iso8601: strip fractional seconds #56

Closed liambeguin closed 5 months ago

liambeguin commented 5 months ago

According to ISO8601 any number of digits is permitted for fractional seconds, the issue is that Python assumes these are microsecond, and will fail if we have more than 6 digits.

In the event that we detect more that 6 digits, truncate the fractional part and pass it to datetime.