From f78f3075c49bcec322ba8e8077b8b72b5520b8fa Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 30 Dec 2018 16:31:51 +0200 Subject: Use different time field as it seems to be more correct The starTimestamp is 4 hours apart on 2 different DCs within the sample log. DiveDate on the dive_logs table seems to be correct, but must be converted from human readable format. Signed-off-by: Miika Turkia --- core/import-shearwater.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/import-shearwater.c b/core/import-shearwater.c index d8308f20f..1a96c3e64 100644 --- a/core/import-shearwater.c +++ b/core/import-shearwater.c @@ -483,7 +483,7 @@ int parse_shearwater_cloud_buffer(sqlite3 *handle, const char *url, const char * state.target_table = table; state.sql_handle = handle; - char get_dives[] = "select l.number,startTimestamp,location||' / '||site,buddy,notes,imperialUnits,maxDepth,maxTime,startSurfacePressure,computerSerial,computerModel,d.diveId,l.sampleRateMs FROM dive_details AS d JOIN dive_logs AS l ON d.diveId=l.diveId"; + char get_dives[] = "select l.number,strftime('%s', DiveDate),location||' / '||site,buddy,notes,imperialUnits,maxDepth,maxTime,startSurfacePressure,computerSerial,computerModel,d.diveId,l.sampleRateMs FROM dive_details AS d JOIN dive_logs AS l ON d.diveId=l.diveId"; retval = sqlite3_exec(handle, get_dives, &shearwater_cloud_dive, &state, &err); free_parser_state(&state); -- cgit v1.2.3-70-g09d2