ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

FORCEINLINE VOID FatDateTimeToSystemTime ( OUT PLARGE_INTEGER  SystemTime,
IN PFAT_DATETIME  FatDateTime,
IN UCHAR TenMs  OPTIONAL 
)

Definition at line 105 of file fullfat.c.

Referenced by FatQueryFileTimes().

{
    TIME_FIELDS TimeFields;

    /* Setup time fields */
    TimeFields.Year = FatDateTime->Date.Year + 1980;
    TimeFields.Month = FatDateTime->Date.Month;
    TimeFields.Day = FatDateTime->Date.Day;
    TimeFields.Hour = FatDateTime->Time.Hour;
    TimeFields.Minute = FatDateTime->Time.Minute;
    TimeFields.Second = (FatDateTime->Time.DoubleSeconds << 1);

    /* Adjust up to 10 milliseconds
     * if the parameter was supplied
     */
    if (ARGUMENT_PRESENT(TenMs))
    {
        TimeFields.Second += TenMs / 100;
        TimeFields.Milliseconds = (TenMs % 100) * 10;
    }
    else
    {
        TimeFields.Milliseconds = 0;
    }

    /* Fix seconds value that might get beyoud the bound */
    if (TimeFields.Second > 59) TimeFields.Second = 0;

    /* Perform ceonversion to system time if possible */
    if (RtlTimeFieldsToTime(&TimeFields, SystemTime))
    {
        /* Convert to system time */
        ExLocalTimeToSystemTime(SystemTime, SystemTime);
    }
    else
    {
        /* Set to default time if conversion failed */
        *SystemTime = FatGlobalData.DefaultFileTime;
    }
}

Generated on Sun May 27 2012 05:23:55 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.