1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

date time format

This commit is contained in:
Laserlicht
2023-12-16 14:27:18 +01:00
parent 3cf22f0395
commit 56562ad8dc
7 changed files with 44 additions and 49 deletions

View File

@ -42,6 +42,7 @@
#include "../../lib/serializer/CLoadFile.h"
#include "../../lib/StartInfo.h"
#include "../../lib/rmg/CMapGenOptions.h"
#include "../../lib/Languages.h"
CMapOverview::CMapOverview(std::string mapName, std::string fileName, std::string date, ResourcePath resource, ESelectionScreen tabType)
: CWindowObject(BORDERED | RCLICK_POPUP), resource(resource), mapName(mapName), fileName(fileName), date(date), tabType(tabType)
@ -199,7 +200,7 @@ CMapOverviewWidget::CMapOverviewWidget(CMapOverview& parent):
if(p.date.empty())
{
std::time_t time = boost::filesystem::last_write_time(*CResourceHandler::get()->getResourceName(ResourcePath(p.resource.getName(), p.tabType == ESelectionScreen::campaignList ? EResType::CAMPAIGN : EResType::MAP)));
w->setText(vstd::getFormattedDateTime(time));
w->setText(vstd::getFormattedDateTime(time, Languages::getLanguageOptions(settings["general"]["language"].String()).dateTimeFormat));
}
else
w->setText(p.date);