Strange duplication of dives

Dirk Hohndel dirk at hohndel.org
Sun Dec 16 09:14:40 PST 2012


Jef Driesen <jefdriesen at telenet.be> writes:
>> I just found an odd new bug (or maybe a feature ;) when downloading
>> today's dive on a newly built version. I use a Reefnet Sensus Pro to
>> track my dives, which doesn't seem to allow me to delete dives, so I
>> rely on the drop-duplicate code. Today, I found that it was adding the
>> dupes, but putting them 1 minute earlier, and often treating them as
>> separate trips. I have attached my file, complete with the
>> manufacture test dives and some odd log entries due to leaving my
>> Sensus on the balcony in Mexico (I don't think I would be here with
>> real dives like that!).
>
> I suspect that this is due to how the sensuspro keeps time. It uses the clock of 
> the host system, which means that if the host clock has been adjusted since the 
> last download, then on the next download all dive timestamps will be adjusted 
> with the same amount.
>
> @subsurface dev's: Shouldn't the diveid hash that was introduced some time ago 
> catch this? The raw timestamp in the dive doesn't change, only the parsed 
> date/time value.

The diveid is simply part of the SHA1 hash of the fingerprint of the
dive. I assume that contains the raw timestamp, correct?

We used to cut off downloads by saying "this dive was prior to the last
dive that we already have" - much simpler and certainly prevented what
happened to you...

Linus, you changed this to the SHA1 logic... any idea why this would fail?

/D


More information about the subsurface mailing list