VirtualBox

Changeset 72164 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 8, 2018 1:41:23 PM (7 years ago)
Author:
vboxsync
Message:

RTTimeImplode: Don't use rtTimeConvertToZulu for applying offUTC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/time/time.cpp

    r72150 r72164  
    416416    AssertReturn(pTime->u16YearDay <= (rtTimeIsLeapYear(pTime->i32Year) ? 366 : 365), NULL);
    417417    AssertMsgReturn(pTime->i32Year <= RTTIME_MAX_YEAR && pTime->i32Year >= RTTIME_MIN_YEAR, ("%RI32\n", pTime->i32Year), NULL);
    418 
    419     RTTIME TimeUTC;
    420     if ((pTime->fFlags & RTTIME_FLAGS_TYPE_MASK) == RTTIME_FLAGS_TYPE_LOCAL)
    421     {
    422         TimeUTC = *pTime;
    423         pTime = rtTimeConvertToZulu(&TimeUTC);
    424     }
     418    Assert(pTime->offUTC >= -840 && pTime->offUTC <= 840);
    425419
    426420    /*
     
    440434
    441435    i64Nanos += i32Days * UINT64_C(86400000000000);
     436    if ((pTime->fFlags & RTTIME_FLAGS_TYPE_MASK) == RTTIME_FLAGS_TYPE_LOCAL)
     437        i64Nanos -= pTime->offUTC * RT_NS_1MIN;
    442438
    443439    pTimeSpec->i64NanosecondsRelativeToUnixEpoch = i64Nanos;
Note: See TracChangeset for help on using the changeset viewer.

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