Changeset 074324f1 in mainline


Ignore:
Timestamp:
2012-04-15T23:32:23Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f004318
Parents:
709476f4
Message:

rtc: Check the epoch of the rtc and fix the tm structure if needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/time/cmos-rtc/cmos-rtc.c

    r709476f4 r074324f1  
    389389        rtc_register_write(rtc, RTC_STATUS_B, reg_b | RTC_MASK_24H);
    390390
     391        if (rtc_register_read(rtc, RTC_YEAR) < 100) {
     392                /* The RTC epoch is year 2000 */
     393                t->tm_year -= 100;
     394        }
     395
    391396        /* Check if the rtc is working in bcd mode */
    392397        bcd_mode = !(reg_b & RTC_MASK_BCD);
Note: See TracChangeset for help on using the changeset viewer.