Modified: trunk/reactos/subsys/system/cmd/cmd.c
Modified: trunk/reactos/subsys/system/cmd/locale.c
Modified: trunk/reactos/subsys/system/cmd/prompt.c
--- trunk/reactos/subsys/system/cmd/cmd.c 2005-07-21 15:46:07 UTC (rev 16680)
+++ trunk/reactos/subsys/system/cmd/cmd.c 2005-07-21 16:28:20 UTC (rev 16681)
@@ -1035,8 +1035,11 @@
/* %TIME% */
else if (_tcsicmp(ip,_T("time")) ==0)
{
- TCHAR szTime[40];
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, szTime, sizeof(szTime));
+ TCHAR szTime[40];
+ SYSTEMTIME t;
+ GetSystemTime(&t);
+
+ _sntprintf(szTime ,40,_T("%02d%c%02d%c%02d%c%02d"), t.wHour, cTimeSeparator,t.wMinute , cTimeSeparator,t.wSecond , cDecimalSeparator, t.wMilliseconds );
cp = _stpcpy (cp, szTime);
}
--- trunk/reactos/subsys/system/cmd/locale.c 2005-07-21 15:46:07 UTC (rev 16680)
+++ trunk/reactos/subsys/system/cmd/locale.c 2005-07-21 16:28:20 UTC (rev 16681)
@@ -70,12 +70,12 @@
VOID PrintTime (VOID)
{
- TCHAR szMsg[RC_STRING_MAX_SIZE];
- TCHAR szTime[32];
-
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL,
- szTime, sizeof(szTime));
-
+ TCHAR szMsg[RC_STRING_MAX_SIZE];
+ SYSTEMTIME t;
+ GetSystemTime(&t);
+
LoadString(CMD_ModuleHandle, STRING_LOCALE_HELP1, szMsg, RC_STRING_MAX_SIZE);
- ConOutPrintf(_T("%s: %s\n"), szMsg, szTime);
+ ConOutPrintf(_T("%s: %02d%c%02d%c%02d%c%02d\n"), szMsg, t.wHour, cTimeSeparator,
+ t.wMinute , cTimeSeparator,
+ t.wSecond , cDecimalSeparator, t.wMilliseconds );
}
--- trunk/reactos/subsys/system/cmd/prompt.c 2005-07-21 15:46:07 UTC (rev 16680)
+++ trunk/reactos/subsys/system/cmd/prompt.c 2005-07-21 16:28:20 UTC (rev 16681)
@@ -138,10 +138,11 @@
break;
case _T('T'):
- {
- TCHAR szTime[32];
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL,szTime, sizeof(szTime));
- ConOutPrintf("%s",szTime);
+ {
+ SYSTEMTIME t;
+ GetSystemTime(&t);
+ ConOutPrintf(_T("%02d%c%02d%c%02d%c%02d\n"),t.wHour, cTimeSeparator,t.wMinute , cTimeSeparator,
+ t.wSecond , cDecimalSeparator, t.wMilliseconds );
}
break;