VirtualBox

Changeset 2627 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 14, 2007 2:20:49 PM (18 years ago)
Author:
vboxsync
Message:

Fixed some RTTIME -> tm conversion bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevRTC.cpp

    r2626 r2627  
    710710    memset(&Tm, 0, sizeof(Tm));
    711711    Tm.tm_year = Time.i32Year - 1900;
    712     Tm.tm_mon  = Time.u8Month;
     712    Tm.tm_mon  = Time.u8Month - 1;
    713713    Tm.tm_mday = Time.u8MonthDay;
    714     Tm.tm_wday = Time.u8WeekDay;
    715     Tm.tm_yday = Time.u16YearDay;
     714    Tm.tm_wday = (Time.u8WeekDay - 1 + 7) % 7; /* 0 = monday -> sunday */
     715    Tm.tm_yday = Time.u16YearDay - 1;
    716716    Tm.tm_hour = Time.u8Hour;
    717717    Tm.tm_min  = Time.u8Minute;
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