aboutsummaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-03 13:02:32 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-03 13:02:32 -0700
commit2ad433671f723db36dec268b74c69994a7bdd427 (patch)
treeaa1ceb3788a9e81033cd535e2ca06c7497995c12 /qt-gui.cpp
parentfc75457cc8b3e37ecbd2a2f2111660586a6132da (diff)
downloadsubsurface-2ad433671f723db36dec268b74c69994a7bdd427.tar.gz
Use Qt date localization instead of translated strings
This gets us consistent date format everywhere. The reordering of month name and day of the month didn't work correctly on Windows, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index e337a5ddd..6abdd83ae 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -419,6 +419,12 @@ QString get_short_dive_date_string(timestamp_t when)
return loc.toString(ts.toUTC(), shortDateFormat + " " + timeFormat);
}
+const char *get_dive_date_c_string(timestamp_t when)
+{
+ QString text = get_dive_date_string(when);
+ return strdup(text.toUtf8().data());
+}
+
QString get_trip_date_string(timestamp_t when, int nr)
{
struct tm tm;