[0.21] [Gui] Py311 Initialization of locales... (#3)

* [0.21] [MainGui] Py311add initialization of locales ...

... with native environment setting

* [0.21][Gui] use '%Y-%m-%d %H:%M:%S' as format string for date
This commit is contained in:
Syres916
2023-08-29 16:26:16 -05:00
committed by Chris Hennes
parent c64d89507d
commit 4fc6b3d830
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1677,7 +1677,7 @@ void View3DInventorPy::eventCallback(void * ud, SoEventCallback * n)
// Type
dict.setItem("Type", Py::String(std::string(e->getTypeId().getName().getString())));
// Time
dict.setItem("Time", Py::String(std::string(e->getTime().formatDate().getString())));
dict.setItem("Time", Py::String(std::string(e->getTime().formatDate("%Y-%m-%d %H:%M:%S").getString())));
SbVec2s p = n->getEvent()->getPosition();
Py::Tuple pos(2);
pos.setItem(0, Py::Int(p[0]));
+1
View File
@@ -98,6 +98,7 @@ private:
int main( int argc, char ** argv )
{
#if defined (FC_OS_LINUX) || defined(FC_OS_BSD)
setlocale(LC_ALL, ""); // use native environment settings
// Make sure to setup the Qt locale system before setting LANG and LC_ALL to C.
// which is needed to use the system locale settings.
(void)QLocale::system();