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>
This commit is contained in:
Dirk Hohndel 2014-08-03 13:02:32 -07:00
parent fc75457cc8
commit 2ad433671f
3 changed files with 8 additions and 2 deletions

View file

@ -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;