<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi All,</p>
<p>I would like to add this to planner.c to print the date and
Subsurface version to the diveplan:<br>
</p>
<p> char date_planned[100];<br>
time_t now = time(NULL);<br>
struct tm *t = localtime(&now);<br>
<br>
strftime(date_planned, sizeof(date_planned)-1, "%d.%m.%Y", t);<br>
<br>
len += snprintf(buffer + len, sz_buffer - len,
translate("gettextFromC", "Plan creation date and version: %s,
%s<br></div>"),<br>
date_planned, subsurface_canonical_version());<br>
</p>
<p><br>
</p>
<p>There is one issue:<br>
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?</p>
<p><br>
</p>
<p>Best regards<br>
Stefan</p>
<div class="moz-signature">-- <br>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
<title></title>
<meta name="GENERATOR" content="OpenOffice.org 3.3 (Win32)">
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="Stefan Fuchs">
<meta name="CHANGED" content="20120503;23115492">
<style type="text/css">
<!--
P { color: #000000 }
-->
</style>
<p>Stefan Fuchs<br>
E-Mail: <a href="mailto:sfuchs@gmx.de">sfuchs@gmx.de</a></p>
</div>
</body>
</html>