@@ -104,28 +104,28 @@ wstring Formatter::FormatDate(_In_ const FILETIME& value)
104104 }
105105
106106 // Format date
107- auto cch = ::GetDateFormatEx (LOCALE_NAME_USER_DEFAULT , DATE_SHORTDATE, &st, NULL , NULL , 0 , NULL );
107+ auto cch = ::GetDateFormatW (LOCALE_USER_DEFAULT , DATE_SHORTDATE, &st, NULL , NULL , 0 );
108108 if (!cch)
109109 {
110110 throw win32_error ();
111111 }
112112
113113 date.resize (cch - 1 );
114- cch = ::GetDateFormatEx (LOCALE_NAME_USER_DEFAULT , DATE_SHORTDATE, &st, NULL , const_cast <LPWSTR>(date.c_str ()), cch, NULL );
114+ cch = ::GetDateFormatW (LOCALE_USER_DEFAULT , DATE_SHORTDATE, &st, NULL , const_cast <LPWSTR>(date.c_str ()), cch);
115115 if (!cch)
116116 {
117117 throw win32_error ();
118118 }
119119
120120 // Format time
121- cch = ::GetTimeFormatEx (LOCALE_NAME_USER_DEFAULT , 0 , &st, NULL , NULL , 0 );
121+ cch = ::GetTimeFormatW (LOCALE_USER_DEFAULT , 0 , &st, NULL , NULL , 0 );
122122 if (!cch)
123123 {
124124 throw win32_error ();
125125 }
126126
127127 time.reserve (cch - 1 );
128- cch = ::GetTimeFormatEx (LOCALE_NAME_USER_DEFAULT , 0 , &st, NULL , const_cast <LPWSTR>(time.c_str ()), cch);
128+ cch = ::GetTimeFormatW (LOCALE_USER_DEFAULT , 0 , &st, NULL , const_cast <LPWSTR>(time.c_str ()), cch);
129129 if (!cch)
130130 {
131131 throw win32_error ();
0 commit comments