-\r
- TCHAR buf[100];\r
-\r
- GetDateFormat(LOCALE_USER_DEFAULT, option, &sysTime, NULL, buf, \r
- sizeof(buf)/sizeof(TCHAR)-1);\r
- datetime = buf;\r
- if ( bIncludeTime )\r
+ // should we use the locale settings for formatting the date/time?\r
+ if (CRegDWORD(_T("Software\\TortoiseGit\\UseSystemLocaleForDates"), TRUE))\r
+ {\r
+ // yes\r
+ SYSTEMTIME sysTime;\r
+ cTime.GetAsSystemTime( sysTime );\r
+ \r
+ TCHAR buf[100];\r
+ \r
+ GetDateFormat(LOCALE_USER_DEFAULT, option, &sysTime, NULL, buf, \r
+ sizeof(buf)/sizeof(TCHAR)-1);\r
+ datetime = buf;\r
+ if ( bIncludeTime )\r
+ {\r
+ datetime += _T(" ");\r
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, &sysTime, NULL, buf, sizeof(buf)/sizeof(TCHAR)-1);\r
+ datetime += buf;\r
+ }\r
+ }\r
+ else\r