VirtualBox

Changeset 2629 in vbox for trunk/src/VBox/Runtime/r3/win32


Ignore:
Timestamp:
May 14, 2007 2:26:50 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
21147
Message:

some flags and fixed broken RTTimeLocaleNow on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win32/time-win32.cpp

    r2612 r2629  
    161161    if (!FileTimeToLocalFileTime((FILETIME const *)&u64, (LPFILETIME)&u64Local))
    162162        u64Local = u64;
    163     return RTTimeSpecSetNtTime(pTime, u64);
     163    return RTTimeSpecSetNtTime(pTime, u64Local);
    164164}
    165165
     
    178178{
    179179    /*
    180      * UCT = local + Tzi.Bias;
     180     * UTC = local + Tzi.Bias;
    181181     * The bias is given in minutes.
    182182     */
     
    194194 * @returns pTime.
    195195 * @param   pTime       Where to store the exploded time.
    196  * @param   pTimeSpec   The time spec to exploded. (UCT)
     196 * @param   pTimeSpec   The time spec to exploded. (UTC)
    197197 */
    198198RTDECL(PRTTIME) RTTimeLocalExplode(PRTTIME pTime, PCRTTIMESPEC pTimeSpec)
     
    215215            {
    216216                RTTimeSpecSetNtFileTime(&LocalTime, &FileTime);
    217                 return RTTimeExplode(pTime, &LocalTime);
     217                pTime = RTTimeExplode(pTime, &LocalTime);
     218                if (pTime)
     219                    pTime->fFlags = (pTime->fFlags & ~RTTIME_FLAGS_TYPE_MASK) | RTTIME_FLAGS_TYPE_LOCAL;
     220                return pTime;
    218221            }
    219222        }
     
    226229    LocalTime = *pTimeSpec;
    227230    RTTimeSpecAddNano(&LocalTime, RTTimeLocalDeltaNano());
    228     return RTTimeExplode(pTime, &LocalTime);
    229 }
    230 
     231    pTime = RTTimeExplode(pTime, &LocalTime);
     232    if (pTime)
     233        pTime->fFlags = (pTime->fFlags & ~RTTIME_FLAGS_TYPE_MASK) | RTTIME_FLAGS_TYPE_LOCAL;
     234    return pTime;
     235}
     236
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette