Changeset 72163 in vbox for trunk/src/VBox
- Timestamp:
- May 8, 2018 12:52:17 PM (7 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/RTTimeLocalExplode-generic.cpp
r72140 r72163 36 36 { 37 37 RTTIMESPEC LocalTime = *pTimeSpec; 38 int64_t LocalUTCOffset = RTTimeLocalDeltaNano(); /**< @todo this is obviously wrong. Need RTTimeLocalDeltaNanoFor(pTimeSpec); */39 RTTimeSpecAddNano(&LocalTime, LocalUTCOffset);38 int64_t cNsUtcOffset = RTTimeLocalDeltaNano(); /**< @todo this is obviously wrong. Need RTTimeLocalDeltaNanoFor(pTimeSpec); */ 39 RTTimeSpecAddNano(&LocalTime, cNsUtcOffset); 40 40 pTime = RTTimeExplode(pTime, &LocalTime); 41 41 if (pTime) 42 42 { 43 43 pTime->fFlags = (pTime->fFlags & ~RTTIME_FLAGS_TYPE_MASK) | RTTIME_FLAGS_TYPE_LOCAL; 44 pTime->offUTC = LocalUTCOffset / RT_NS_1MIN;44 pTime->offUTC = cNsUtcOffset / RT_NS_1MIN; 45 45 } 46 46 return pTime; -
trunk/src/VBox/Runtime/r3/posix/timelocal-posix.cpp
r72140 r72163 174 174 { 175 175 RTTIMESPEC LocalTime = *pTimeSpec; 176 int64_t LocalUTCOffset = rtTimeLocalUTCOffset(&LocalTime, true /* current time, skip fallback */);177 RTTimeSpecAddNano(&LocalTime, LocalUTCOffset);176 int64_t cNsUtcOffset = rtTimeLocalUTCOffset(&LocalTime, true /* current time, skip fallback */); 177 RTTimeSpecAddNano(&LocalTime, cNsUtcOffset); 178 178 pTime = RTTimeExplode(pTime, &LocalTime); 179 179 if (pTime) 180 180 { 181 181 pTime->fFlags = (pTime->fFlags & ~RTTIME_FLAGS_TYPE_MASK) | RTTIME_FLAGS_TYPE_LOCAL; 182 pTime->offUTC = LocalUTCOffset / RT_NS_1MIN;182 pTime->offUTC = cNsUtcOffset / RT_NS_1MIN; 183 183 } 184 184 return pTime; -
trunk/src/VBox/Runtime/r3/win/time2-win.cpp
r72162 r72163 96 96 */ 97 97 LocalTime = *pTimeSpec; 98 int64_t LocalUTCOffset = RTTimeLocalDeltaNano();99 RTTimeSpecAddNano(&LocalTime, LocalUTCOffset);98 int64_t cNsUtcOffset = RTTimeLocalDeltaNano(); 99 RTTimeSpecAddNano(&LocalTime, cNsUtcOffset); 100 100 pTime = RTTimeExplode(pTime, &LocalTime); 101 101 if (pTime) 102 102 { 103 103 pTime->fFlags = (pTime->fFlags & ~RTTIME_FLAGS_TYPE_MASK) | RTTIME_FLAGS_TYPE_LOCAL; 104 pTime->offUTC = LocalUTCOffset / RT_NS_1MIN;104 pTime->offUTC = cNsUtcOffset / RT_NS_1MIN; 105 105 } 106 106 return pTime;
Note:
See TracChangeset
for help on using the changeset viewer.