Description
CmConvertTime as a helper function converts calendar date specifications into seconds since 2000-01-01T00:00 and vice versa.
Syntax
CODEMETER_API int CMAPIENTRY CmConvertTime(CMULONG flCtrl, CMTIME *pcmtime);
Parameter
flCtrl specifies the following flags.
CM_CONVERT_SECONDS_TO_CALENDAR specifies that the time is converted from "seconds since 2000" to a calender date.
CM_CONVERT_CALENDAR_TO_SECONDS specifies that the the time is converted from a calender date to "seconds since 2000".
CMTIME contains a given CMTIME structure as part of API calls, for example, CmAccess2, etc.
Structure CMTIME
CMTIME sets or gets the time to or from a CmContainer.
Syntax
typedef struct __CMTIME {
CMUSHORT musYear;
CMUSHORT musMonth;
CMUSHORT musDay;
CMUSHORT musHours;
CMUSHORT musMinutes;
CMUSHORT musSeconds;
CMULONG mulSecondsSince01_01_2000;
} CMTIME;
|
Parameter
musYear specifies the value of the year (e.g. 2003).
musMonth specifies the value of the month (1..12).
musDay specifies the value of the day (1..31).
musHours specifies the value of the hours (0..23).
musMinutes specifies the value of the minutes (0..59).
musSeconds specifies the value of the seconds (0..59).
mulSecondsSince01_01_2000 specifies the time in seconds since 01/01/2000.
|
pcmtime contains the conversion time result according to the specified flag.
Return
If CM_CONVERT_SECONDS_TO_CALENDAR is specified, *pcmtime holds valid amount of seconds (unequal 0) since 2000-01-01T00:00.
If CM_CONVERT_CALENDAR_TO_SECONDS is specified, *pcmtime holds valid calender date.
|