Page 1 of 1

UDDF import ignoring dive datetime element

Posted: Fri Nov 30, 2012 9:34 am
by pridkett
Hi Nick,

I'm the guy that spent forever working with Asix to hack Uwatec Galileo IrDA support into libdivecomputer on Mac OS X. Eventually I gave up because I didn't feel like writing a complete IrDA socket layer. However, I came up with a nice little solution that uses a Linux VM and a custom little program called dc2uddf to download my dives directly into a UDDF file that I can import into other tools. For the most part everything looks great (depth, pressure, temperature). However, MacDive is not assigning the date to the dives properly. Specifically in UDDF each <dive> element must have a <datetime> element that can be formatted any one of numerous ways. For example, for a dive on November 25, 2012 at 10:25am Eastern Standard Time (GMT-5) I could write:

<datetime>2012-11-25T10:25-0500</datetime> (timezone explict)
<datetime>2012-11-25T10:25</datetime> (timezone should be machine time zone, which is GMT-5 for my MBP)
<datetime>2012-11-25T15:25Z</datetime> (using gmt)

Unfortunately, when I import dives they're all given timestamps of 12:00am January 1, 2001.

This is kinda a bummer when downloading dozens of dive from my Galileo Luna. Any chance you could look into it?

I've posted a sample UDDF file with a single dive to https://dl.dropbox.com/u/54515/output.uddf (ignore the pressure stuff, that's a stupid off by 10 problem that I've since fixed. I didn't start a dive with under 200PSI).

I've confirmed that the dive imports fine and the time is set properly under subsurface, so I'm pretty certain I'm adhering to the UDDF spec.

Re: UDDF import ignoring dive datetime element

Posted: Fri Nov 30, 2012 9:40 am
by nick
Sure, I'll take a look over the weekend.

Re: UDDF import ignoring dive datetime element

Posted: Sun Dec 02, 2012 4:28 am
by pridkett
Did some more digging and I found out that the example dive posted at http://www.streit.cc/extern/uddf_v310/e ... files.html and the specification of the dive element posted at http://www.streit.cc/extern/uddf_v310/en/dive.html disagreed. I didn't include <divetime> in the <informationbeforedive> element and MacDive therefore ignored the <datetime> element because it wasn't where it was expected. Anyway, it wasn't really your problem after all.

Interestingly enough subsurface had no problem with it -- but that's probably more of an artifact of subsurface.

Sorry about the confusion.

Re: UDDF import ignoring dive datetime element

Posted: Sun Dec 02, 2012 4:33 am
by nick
Ok, thanks for the update.