Changeset 8336 for trunk/src/kernel32/time.cpp
- Timestamp:
- Apr 30, 2002, 11:21:33 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/time.cpp
r7854 r8336 1 /* $Id: time.cpp,v 1.1 7 2002-02-09 17:27:32sandervl Exp $ */1 /* $Id: time.cpp,v 1.18 2002-04-30 09:21:33 sandervl Exp $ */ 2 2 3 3 /* … … 31 31 #include <string.h> 32 32 #include <stdio.h> 33 #include <time.h> 33 34 #include "unicode.h" 34 35 … … 104 105 return O32_FileTimeToDosDateTime(arg1, arg2, arg3); 105 106 } 106 //****************************************************************************** 107 //****************************************************************************** 108 BOOL WIN32API FileTimeToLocalFileTime(const FILETIME * arg1, LPFILETIME arg2) 109 { 110 dprintf(("KERNEL32: FileTimeToLocalFileTime\n")); 111 return O32_FileTimeToLocalFileTime(arg1, arg2);107 108 //****************************************************************************** 109 //****************************************************************************** 110 BOOL WIN32API FileTimeToLocalFileTime(const FILETIME * utcft, LPFILETIME localft) 111 { 112 return O32_FileTimeToLocalFileTime(utcft,localft); 112 113 } 113 114 //****************************************************************************** … … 122 123 BOOL WIN32API FileTimeToSystemTime(const FILETIME * arg1, LPSYSTEMTIME arg2) 123 124 { 124 return O32_FileTimeToSystemTime(arg1, arg2); 125 /* Another WGSS bug it expects not UCT on input but LocalTime! */ 126 FILETIME dummy; 127 FileTimeToLocalFileTime(arg1,&dummy); 128 return O32_FileTimeToSystemTime(&dummy, arg2); 125 129 } 126 130 //****************************************************************************** … … 128 132 BOOL WIN32API DosDateTimeToFileTime(WORD arg1, WORD arg2, LPFILETIME arg3) 129 133 { 130 return O32_DosDateTimeToFileTime(arg1, arg2, arg3); 134 BOOL rc; 135 rc = O32_DosDateTimeToFileTime(arg1, arg2, arg3); 136 /* Bug in WGSS after that we must have UCT file time on return, 137 instead we have local! */ 138 if (rc) 139 { 140 FILETIME dummy; 141 /* Convert it to UCT */ 142 rc = LocalFileTimeToFileTime(arg3,&dummy); 143 memcpy(arg3,&dummy,sizeof(FILETIME)); 144 } 145 return rc; 131 146 } 132 147 //****************************************************************************** … … 154 169 LPFILETIME arg2) 155 170 { 156 return O32_SystemTimeToFileTime(arg1, arg2); 171 BOOL rc; 172 rc = O32_SystemTimeToFileTime(arg1, arg2); 173 /* Bug in WGSS after that we must have UCT file time on return, 174 instead we have local! */ 175 if (rc) 176 { 177 FILETIME dummy; 178 /* Convert it to local */ 179 rc = LocalFileTimeToFileTime(arg2,&dummy); 180 memcpy(arg2,&dummy,sizeof(FILETIME)); 181 } 182 return rc; 157 183 } 158 184 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.