summaryrefslogtreecommitdiffstats
path: root/save-html.c
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-08-07 17:11:42 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-11 08:21:06 -0700
commita8bca851692f93a252692d7275912628ec910acd (patch)
tree3964a0dd8cfaa9741a43733df30122c3a3562232 /save-html.c
parent3ebb62f153c11a123e86d68f0b62998e91162779 (diff)
downloadsubsurface-a8bca851692f93a252692d7275912628ec910acd.tar.gz
HTML: export dive duration value to the detailed view.
Dive duration value is missing in the dive exports Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-html.c')
-rw-r--r--save-html.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/save-html.c b/save-html.c
index 652ffb411..6190c36c1 100644
--- a/save-html.c
+++ b/save-html.c
@@ -209,6 +209,8 @@ void write_one_dive(struct membuffer *b, struct dive *dive, const char *photos_d
write_attribute(b, "location", dive->location);
put_format(b, "\"rating\":%d,", dive->rating);
put_format(b, "\"visibility\":%d,", dive->visibility);
+ put_format(b, "\"dive_duration\":\"%u:%02u min\",",
+ FRACTION(dive->duration.seconds, 60));
put_string(b, "\"temperature\":{");
put_HTML_airtemp(b, dive, "\"air\":\"", "\",");
put_HTML_watertemp(b, dive, "\"water\":\"", "\",");