2.1.8.3 convert_time_to_local


Description

Converts a time value and corrects for the local time zone..

Syntax

void convert_time_to_local( time_t * pTime, TM * pLocalTM )

Parameters

pTime
[input]pointer to a time_t variable
pLocalTM
[output]pointer to a TM structure to receive the result

Return

Examples

EX1

void convert_time_to_local_ex1()
{
    SYSTEMTIME st;
    TM tmLocal;
    time_t aclock;
    
    time( &aclock );
    convert_time_to_local( &aclock , &tmLocal);
    tm_to_systemtime(&tmLocal, &st);
    double dDate;
    SystemTimeToJulianDate(&dDate, &st);
    out_str(get_date_str(dDate, LDF_SHORT_AND_HHMMSS_SEPARCOLON));
}

Remark

See Also

localtime, SystemTimeToJulianDate, get_date_str, tm_to_systemtime

Header to Include

origin.h

Reference