From: Jeffrey Altman Date: Tue, 22 Nov 2005 00:31:44 +0000 (+0000) Subject: windows-date-representation-20051121 X-Git-Tag: openafs-devel-1_5_0~191 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=81365856ce91121c82969f97c1e79d34d30da648;p=packages%2Fo%2Fopenafs.git windows-date-representation-20051121 change date representation to yyyy-MM-dd HH:mm:ss so that it sorts properly --- diff --git a/src/WINNT/talocale/tal_string.cpp b/src/WINNT/talocale/tal_string.cpp index 711926482..fc542fe70 100644 --- a/src/WINNT/talocale/tal_string.cpp +++ b/src/WINNT/talocale/tal_string.cpp @@ -823,21 +823,21 @@ BOOL FormatTime (LPTSTR pszTarget, LPTSTR pszFormatUser, SYSTEMTIME *pst, BOOL f } else { - GetTimeFormat (LOCALE_USER_DEFAULT, 0, <, NULL, szTime, cchRESOURCE); - GetDateFormat (LOCALE_USER_DEFAULT, DATE_SHORTDATE, <, NULL, szDate, cchRESOURCE); + GetTimeFormat (LOCALE_USER_DEFAULT, 0, <, "HH:mm:ss", szTime, cchRESOURCE); + GetDateFormat (LOCALE_USER_DEFAULT, 0, <, "yyyy-MM-dd", szDate, cchRESOURCE); if (fShowTime && fShowDate) { - lstrcat (szTime, TEXT(" ")); - lstrcat (szTime, szDate); + lstrcat (szDate, TEXT(" ")); + lstrcat (szDate, szTime); } - else if (fShowDate && !fShowTime) + else if (!fShowDate && fShowTime) { - lstrcpy (szTime, szDate); + lstrcpy (szDate, szTime); } } - wsprintf (pszTarget, FixFormatString (pszFormatUser), szTime); + wsprintf (pszTarget, FixFormatString (pszFormatUser), szDate); return rc; }