summaryrefslogtreecommitdiffstats
path: root/core/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-03-31 08:14:36 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-06 18:29:11 -0700
commitc9c9b1b39951500829febd49adf9ead0d9426b59 (patch)
treeaaca1a3969bd94f427ab97c262d76b58c831ae66 /core/qthelper.cpp
parent385816be2ee120850415ae79a2187bf0cdbce593 (diff)
downloadsubsurface-c9c9b1b39951500829febd49adf9ead0d9426b59.tar.gz
Add creation date and Subsurface version to planner output
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r--core/qthelper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 943ad00b6..126792d52 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -959,6 +959,16 @@ const char *get_dive_date_c_string(timestamp_t when)
return strdup(text.toUtf8().data());
}
+extern "C" const char *get_current_date()
+{
+ QDateTime ts(QDateTime::currentDateTime());;
+ QString current_date;
+
+ current_date = loc.toString(ts, QString(prefs.date_format_short));
+
+ return strdup(current_date.toUtf8().data());
+}
+
bool is_same_day(timestamp_t trip_when, timestamp_t dive_when)
{
static timestamp_t twhen = (timestamp_t) 0;