Time shifted when importing dive logs

29 views
Skip to first unread message

Steven Sanford

unread,
Aug 7, 2022, 11:50:24 PMAug 7
to Subsurface Divelog
When importing from DLF files on my computer, the time is shifted by 5 hours later.  I live in Central time Zone in the US.
I assume it has to do with GMT. Is there a way to auto correct for that while importing?

Thanks
Steve

Jason Bramwell

unread,
Aug 8, 2022, 2:12:00 AMAug 8
to subsurfac...@googlegroups.com
What dive computer is this? I personally have not heard or DLF files before. Are we able to get an example DLF file and for you to tell us what time you think that dive happened.

Jason

Sent from my iPhone

On 8 Aug 2022, at 04:50, Steven Sanford <stevenb...@gmail.com> wrote:

When importing from DLF files on my computer, the time is shifted by 5 hours later.  I live in Central time Zone in the US.
I assume it has to do with GMT. Is there a way to auto correct for that while importing?

Thanks
Steve

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/915c99e0-4b1f-49c0-a282-9559f5d6e536n%40googlegroups.com.

miika....@gmail.com

unread,
Aug 8, 2022, 2:40:19 AMAug 8
to Subsurface Divelog
It is Divesoft Freedom and the file format is binary. I have no recollection of where the info of this format has came from, but based on git blame, the import has been implemented by Linus. Timezone issue is a sounds plausible explanation. Would be good to have few more data points to confirm the assumption.

Jason Bramwell

unread,
Aug 8, 2022, 2:52:20 AMAug 8
to subsurfac...@googlegroups.com
Thanks Miika,
To me it sounds like the logs are all being captured in absolute time values (all UTC) and any time zone setting on the device is just shifting the displayed but lot logged time. If this is true it’s a bit of a weird design decision from Divesoft.

Steve,
Do these dives report the correct wine in the Divesoft log software? In the settings of that software do you specify your time zone or location at all?

Jason 

Sent from my iPhone

On 8 Aug 2022, at 07:40, miika....@gmail.com <miika....@gmail.com> wrote:

It is Divesoft Freedom and the file format is binary. I have no recollection of where the info of this format has came from, but based on git blame, the import has been implemented by Linus. Timezone issue is a sounds plausible explanation. Would be good to have few more data points to confirm the assumption.

Steven Sanford

unread,
Aug 8, 2022, 12:21:43 PMAug 8
to subsurfac...@googlegroups.com
I dive a Divesoft rebreather with their hardwired computer. If my dive was at 1PM local time, it comes over in subsurface as 6PM. We are 6 hours being GMT and are in daylight savings time so only total of 5 hours from GMT. 
I have attached a file from 7 Aug '22 @10:43 AM Central time (DST).  It came over as 3:43PM.
As I consider things, I'm not sure how Divesoft registers their time.

Thanks
Steve

You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/s5Ob7HZ5ZDk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/7A9619BC-57EF-4921-8572-AD33350C3A80%40gmail.com.
00000032.dlf

Linus Torvalds

unread,
Aug 8, 2022, 1:03:35 PMAug 8
to subsurfac...@googlegroups.com
On Sun, Aug 7, 2022 at 11:40 PM miika....@gmail.com
<miika....@gmail.com> wrote:
>
> It is Divesoft Freedom and the file format is binary. I have no
> recollection of where the info of this format has came from, but based
> on git blame, the import has been implemented by Linus.

I think you may have been confused by the file movement (from
"parse-xml.c" to "core/parse-xml.c"). Use "git blame -C" to make git
blame follow file movement and copies.

It's 8 years ago, but git claims it was actually you:

git show b000e1b591 ce1f69f025

with Anton Lundin as a co-conspirator

git log -p -5 4a8e1485e179

but I have no idea where the info came from.

Linus

Miika Turkia

unread,
Aug 11, 2022, 11:14:44 AMAug 11
to Subsurface Divelog
On Mon, Aug 8, 2022 at 8:03 PM Linus Torvalds <torv...@linuxfoundation.org> wrote:
On Sun, Aug 7, 2022 at 11:40 PM miika....@gmail.com
<miika....@gmail.com> wrote:
>
> It is Divesoft Freedom and the file format is binary. I have no
> recollection of where the info of this format has came from, but based
> on git blame, the import has been implemented by Linus.

I think you may have been confused by the file movement (from
"parse-xml.c" to "core/parse-xml.c"). Use "git blame -C" to make git
blame follow file movement and copies.

It's 8 years ago, but git claims it was actually you:

Well, I am not really surprised by this. Will need to remember the '-C' in the future :D

    git show b000e1b591 ce1f69f025

with Anton Lundin as a co-conspirator

     git log -p -5 4a8e1485e179

but I have no idea where the info came from.

I do seem have a header file describing the dive structure for this DC, just did not find any email revealing where I got it from. Anyway, I don't see any reference to timezones, so it is just a single timestamp for the start of the dive.
---8<---
typedef uint32_t    t_datim;      // count of seconds since 1.1.2000 00:00:00
---8<---

I think that from Subsurface perspective, it is better to import the time as is, as we have no idea whether the import occurs at the same timezone where the dive happened. But it is relatively easy to shift the times for all the newly imported dives. Once they are imported, choose the new ones, right-click and choose "shift divetimes". (I just noticed that the dialog to shift times is showing me current time as 0, and not the correct one but the shift works still correctly. Subsurface 5.0.8 currently, trying to update, but my internet is too slow atm.)

miika

Steven Sanford

unread,
Aug 11, 2022, 11:49:20 AMAug 11
to subsurfac...@googlegroups.com
Thanks 
I did find the batch time shift option with right click. 

Steve

--
You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/s5Ob7HZ5ZDk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/CAEB307Pzn_jRGqscm0zkyikDTKy3cJesWxg%3D3vm7jf%2BRemNJTQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages