X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=save-xml.c;h=e47092ebcb9d9dee241e08f1a1396446edbcfb21;hb=6538e5bba00b51a7253b6cff927c8774f1b39e2b;hp=c93a828cc54f8fa5b1c29eb28bf7b42762fe034e;hpb=d1b30212ff7192ef1b3fa85924433a8ddd92c281;p=ext%2Fsubsurface.git diff --git a/save-xml.c b/save-xml.c index c93a828..e47092e 100644 --- a/save-xml.c +++ b/save-xml.c @@ -205,9 +205,14 @@ static void save_dive(FILE *f, struct dive *dive) int i; struct tm *tm = gmtime(&dive->when); - fprintf(f, "\n", - tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec, + fputs("nr) + fprintf(f, " nr='%d'", dive->nr); + fprintf(f, " date='%04u-%02u-%02u'", + tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday); + fprintf(f, " time='%02u:%02u:%02u'", + tm->tm_hour, tm->tm_min, tm->tm_sec); + fprintf(f, " duration='%u:%02u min'>\n", FRACTION(dive->duration.seconds, 60)); save_overview(f, dive); save_cylinder_info(f, dive);