MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / SetupEnvironment

Function SetupEnvironment

src/commons/util/util.cpp:1006–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1004}
1005
1006void SetupEnvironment() {
1007#ifndef WIN32
1008 try {
1009#if BOOST_FILESYSTEM_VERSION == 3
1010 boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid
1011#else // boost filesystem v2
1012 locale(); // Raises runtime error if current locale is invalid
1013#endif
1014 } catch (runtime_error& e) {
1015 setenv("LC_ALL", "C", 1); // Force C locale
1016 }
1017#endif
1018}
1019
1020string DateTimeStrFormat(const char* pszFormat, int64_t nTime) {
1021 // locale takes ownership of the pointer

Callers 3

RunCoinFunction · 0.85
mainFunction · 0.85
RunCoinFunction · 0.85

Calls

no outgoing calls

Tested by 1

RunCoinFunction · 0.68