Include dive time in TeX/LaTeX export

This was missing in the export. We export separate hour and
minutes so the template can decide about the time format.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2019-01-04 22:52:35 +01:00 committed by Dirk Hohndel
parent dece8d1ba4
commit 2d8a8f974b

View file

@ -327,6 +327,8 @@ void DiveLogExportDialog::export_TeX(const char *filename, const bool selected_o
put_format(&buf, "\n%% Time, Date, and location:\n");
put_format(&buf, "\\def\\%sdate{%04u-%02u-%02u}\n", ssrf,
tm.tm_year, tm.tm_mon+1, tm.tm_mday);
put_format(&buf, "\\def\\%shour{%02u}\n", ssrf, tm.tm_hour);
put_format(&buf, "\\def\\%sminute{%02u}\n", ssrf, tm.tm_min);
put_format(&buf, "\\def\\%snumber{%d}\n", ssrf, dive->number);
put_format(&buf, "\\def\\%splace{%s}\n", ssrf, site ? site->name : "");
put_format(&buf, "\\def\\%sspot{}\n", ssrf);