Hi All,
I would like to add this to planner.c to print the date and Subsurface
version to the diveplan:
char date_planned[100];
time_t now = time(NULL);
struct tm *t = localtime(&now);
strftime(date_planned, sizeof(date_planned)-1, "%d.%m.%Y", t);
len += snprintf(buffer + len, sz_buffer - len,
translate("gettextFromC", "Plan creation date and version: %s,
%s<br></div>"),
date_planned, subsurface_canonical_version());
There is one issue:
I would like to use the date format as defined in
"prefs.date_format_short". But the Qt syntax of this is not compatible
with the syntax strftime needs. Does anyone know an easy way to convert
the string or in general to solve this?
Best regards
Stefan
--
Stefan Fuchs
E-Mail: [email protected] <mailto:[email protected]>
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface