<p>As I commented, the definite answer can only come from oceaninstruments.nz, as they know the latest software (have only access to software from 2021).</p>
<p>However, there are a few considerations that may help:</p>
<ul>
<li>soundtrap filing has typically file header followed by compressed data blocks, each of which has its own block header.</li>
<li>the time stamps in OP are precise to a second</li>
<li>the two different times in OP mean that file header is written before first data block, which is to be expected in cases where data block time is determined when data is written to file and not when data was acquired.</li>
<li>due to the second-level precision, the time difference is less than a second (fractional seconds are discarded)</li>
</ul>
<p>With that information I would conclude</p>
<ul>
<li>use the file timestamp as is closer to acquisition time</li>
<li>use only the timestamp of the first file and obtain time axis from sample count to avoid difficulties between two files.</li>
</ul>
<p>Edit:</p>
<p>In case of duty cycling with hibernating recorder (to save power) then it could easily be, as indicated by comment, that file name uses the power-up time, and sampling start time corresponds to start of acquisition, as its name says. This can easily be seen from sequence of event times in log file and by comparing different modes of operation, continuous recording vs duty cycling.</p>
<ul>
<li>If this is the case, then the log file time stamp is indeed the one to use.</li>
</ul>
<p>Comment: This OP is an example that for correct answers, question should always provide contextual information</p>

CC BY-SA 4.0
2022-11-14T18:53:41.473Z
Thank you WMXZ, I have an email out to OceanInstruments to ask.  Another problem is that my first data file is about 15 days later than the time I programmed the unit to start, so I can't use that as a guide for which one is correct.
Catherine
CC BY-SA 4.0
2022-11-19T00:34:52.630Z
From OceanInstruments:  I believe the earlier time is when the recorder powered up, and the latter is when audio sampling began. So the latter is probably more useful
Catherine
CC BY-SA 4.0
2024-03-26T00:48:13.707Z
As a follow up to this - we ran a few bench tests, tapping the recorder and noting the time.   The correct time is the one listed in the log file as: SamplingStartTimeLocal.
Catherine
CC BY-SA 4.0
2022-11-14T07:22:42.080Z
2022-11-19T07:33:41.913Z
2022-11-19T07:33:41.913Z
WMXZ
<p>I am finding it is consistently 1 second later in the log file</p>
<p>WavFileHandler SamplingStartTimeLocal=&quot;2022-06-02T12:10:09&quot;</p>
<p>for the file named:  5381.220602121008.wav</p>
<p>Which is the correct one?</p>
<p>-C</p>

CC BY-SA 4.0
2022-11-13T14:30:29.523Z
This question is so hardware specific to better ask oceaninstruments. An answer would need access to latest source-code.
WMXZ
CC BY-SA 4.0
2022-11-16T21:27:59.353Z
@Catherine -- If you receive an answer from Ocean Instruments, please post a response to your own answer here, this will help out others in the future. Thanks!
Shannon
<recording><soundtrap>
Is the actual SoundTrap 500HF file start time the one in the filename or the one listed in the log.xml file?
# Is the actual SoundTrap 500HF file start time the one in the filename or the one listed in the log.xml file?

(Asked by: username_0 on 2022-11-13)

I am finding it is consistently 1 second later in the log file

WavFileHandler SamplingStartTimeLocal="2022-06-02T12:10:09"

for the file named: 5381.220602121008.wav

Which is the correct one?

-C

**Tags:** recording, soundtrap

> **Comments:**
> **username_1**: This question is so hardware specific to better ask oceaninstruments. An answer would need access to latest source-code.  
> **username_2**: @username_0 -- If you receive an answer from Ocean Instruments, please post a response to your own answer here, this will help out others in the future. Thanks!  

---

## 1 answers

### Answer by username_1 on 2022-11-14. Score: 4

As I commented, the definite answer can only come from oceaninstruments.nz, as they know the latest software (have only access to software from 2021).

However, there are a few considerations that may help:

* soundtrap filing has typically file header followed by compressed data blocks, each of which has its own block header.
* the time stamps in OP are precise to a second
* the two different times in OP mean that file header is written before first data block, which is to be expected in cases where data block time is determined when data is written to file and not when data was acquired.
* due to the second-level precision, the time difference is less than a second (fractional seconds are discarded)

With that information I would conclude

* use the file timestamp as is closer to acquisition time
* use only the timestamp of the first file and obtain time axis from sample count to avoid difficulties between two files.

Edit:

In case of duty cycling with hibernating recorder (to save power) then it could easily be, as indicated by comment, that file name uses the power-up time, and sampling start time corresponds to start of acquisition, as its name says. This can easily be seen from sequence of event times in log file and by comparing different modes of operation, continuous recording vs duty cycling.

* If this is the case, then the log file time stamp is indeed the one to use.

Comment: This OP is an example that for correct answers, question should always provide contextual information

> **Comments:**
> **username_0**: Thank you username_1, I have an email out to OceanInstruments to ask.  Another problem is that my first data file is about 15 days later than the time I programmed the unit to start, so I can't use that as a guide for which one is correct.  
> **username_0**: From OceanInstruments:  I believe the earlier time is when the recorder powered up, and the latter is when audio sampling began. So the latter is probably more useful  
> **username_0**: As a follow up to this - we ran a few bench tests, tapping the recorder and noting the time.   The correct time is the one listed in the log file as: SamplingStartTimeLocal.  

---

