summaryrefslogtreecommitdiffstats
path: root/core/import-shearwater.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2018-12-30 16:31:51 +0200
committerGravatar Miika Turkia <miika.turkia@gmail.com>2018-12-30 16:31:51 +0200
commit01365b8c4b2cd73039f41f5d3f433c5d922fcf34 (patch)
treec9676d49929dbe72aebc312d724ee4fab12da850 /core/import-shearwater.c
parent5e0f105114dc9181d597c6190a35f467304a241d (diff)
downloadsubsurface-01365b8c4b2cd73039f41f5d3f433c5d922fcf34.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/import-shearwater.c')
-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);