#include <stdlib.h>
#include <memory.h>
+#include <runtime_info.h>
#include <FBaseSysLog.h>
#include <FBase_NativeError.h>
}
UChar customSkeleton[256] = {0, };
- const char* pLocaleDefault = uloc_getDefault();
-
- pDateTimeFormat = const_cast< char* > (pLocaleDefault);
-
- u_uastrncpy(customSkeleton, pIcuFormat, sizeof(customSkeleton));
- pFormatString = GetIcuPatternN(pDateTimeFormat, customSkeleton);
-
+ char* pRegionPtr;
+ if (runtime_info_get_value_string(RUNTIME_INFO_KEY_REGION, &pRegionPtr) == RUNTIME_INFO_ERROR_NONE)
+ {
+ u_uastrncpy(customSkeleton, pIcuFormat, sizeof(customSkeleton));
+ pFormatString = GetIcuPatternN(pRegionPtr, customSkeleton);
+ free(pRegionPtr);
+ }
return pFormatString;
}