|
@@ -1,6 +1,10 @@
|
|
|
#include "StdInc.h"
|
|
#include "StdInc.h"
|
|
|
#include <vstd/DateUtils.h>
|
|
#include <vstd/DateUtils.h>
|
|
|
|
|
|
|
|
|
|
+#if defined(VCMI_ANDROID)
|
|
|
|
|
+#include "../CAndroidVMHelper.h"
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
namespace vstd
|
|
namespace vstd
|
|
@@ -8,6 +12,11 @@ namespace vstd
|
|
|
|
|
|
|
|
DLL_LINKAGE std::string getFormattedDateTime(std::time_t dt)
|
|
DLL_LINKAGE std::string getFormattedDateTime(std::time_t dt)
|
|
|
{
|
|
{
|
|
|
|
|
+#if defined(VCMI_ANDROID)
|
|
|
|
|
+ CAndroidVMHelper vmHelper;
|
|
|
|
|
+ return vmHelper.callStaticStringMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "getFormattedDateTime");
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
std::tm tm = *std::localtime(&dt);
|
|
std::tm tm = *std::localtime(&dt);
|
|
|
std::stringstream s;
|
|
std::stringstream s;
|
|
|
try
|
|
try
|