[PATCH 04/17] Support empty time on Divinglog import

Miika Turkia miika.turkia at gmail.com
Sun Jul 12 10:46:49 PDT 2015


Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 parse-xml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse-xml.c b/parse-xml.c
index 7f00294..62eceaa 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -2890,7 +2890,7 @@ int parse_divinglog_buffer(sqlite3 *handle, const char *url, const char *buffer,
 	char *err = NULL;
 	target_table = table;
 
-	char get_dives[] = "select Number,strftime('%s',Divedate || ' ' || Entrytime),Country || ' - ' || City || ' - ' || Place,Buddy,Comments,Depth,Divetime from Logbook where UUID not in (select UUID from DeletedRecords)";
+	char get_dives[] = "select Number,strftime('%s',Divedate || ' ' || ifnull(Entrytime,'00:00')),Country || ' - ' || City || ' - ' || Place,Buddy,Comments,Depth,Divetime from Logbook where UUID not in (select UUID from DeletedRecords)";
 
 	retval = sqlite3_exec(handle, get_dives, &divinglog_dive, handle, &err);
 
-- 
2.1.4



More information about the subsurface mailing list