DateTime dirCreationTime;\r
Locale locale(LANGUAGE_ENG, COUNTRY_US);\r
\r
+ String timeFormatKeyName(L"TimeFormat");\r
+ int timeFormatSelected = TIME_FORMAT_NONE;\r
+ AppRegistry* pAppRegistry = null;\r
+\r
dirCreationTime = fileCreationTime;\r
+ pAppRegistry = UiApp::App::GetInstance()->GetAppRegistry();\r
\r
pDateFormatter = DateTimeFormatter::CreateDateFormatterN(locale, DATE_TIME_STYLE_DEFAULT);\r
TryCatch(pDateFormatter != null, dateAndTime.Append("Not Found"), "Failed to get date time formatter");\r
\r
+ pAppRegistry->Get(timeFormatKeyName, timeFormatSelected);\r
+\r
// Customized pattern\r
- cutomizedPattern.Append(L"d MMM, yyyy HH:mm");\r
+ if (timeFormatSelected == TIME_FORMAT_24_HOUR)\r
+ {\r
+ cutomizedPattern.Append(L"d MMM, yyyy HH:mm");\r
+ }\r
+ else\r
+ {\r
+ cutomizedPattern.Append(L"d MMM, yyyy hh:mm a");\r
+ }\r
+\r
pDateFormatter->ApplyPattern(cutomizedPattern);\r
\r
// Format creation time with date formatter\r