summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2018-12-30 16:31:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-22 13:04:36 +1300
commitf78f3075c49bcec322ba8e8077b8b72b5520b8fa (patch)
tree5b882c7bca4fcf98e87cb83992f40c658a502d41 /core
parent4aac746bf02148bdb9e2615ec6d8a9151c53b474 (diff)
downloadsubsurface-f78f3075c49bcec322ba8e8077b8b72b5520b8fa.tar.gz
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 <miika.turkia@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/import-shearwater.c2
1 files changed, 1 insertions, 1 deletions
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);