This function sets a PITIMESTAMP structure using the passed time components.

Visual Basic format

Declare Function pitm_settime Lib "piapi32.dll" (
time0 As PITimeStamp,
ByVal xyear&,
ByVal xmonth&,
ByVal xday&,
ByVal xhour&,
ByVal xminute&,
ByVal xsecond#) As Long

C format

int32 PIPROC pitm_settime(
int32 year,
int32 month,
int32 day,
int32 hour,
int32 minute,
float64 second);





Argument out of range



timestamp (returned)

Structure containing timestamp. 

year (passed)

Four digit year (that is, including century)

month (passed)

Month (1-12)

day (passed)

Day (1-31)

hour (passed)

Hour (0-23)

minute (passed)

Minute (0-59)

second (passed)

Second (greater than or equal to 0 and less than 60).Use floating point notation to indicate subsecond times (for example, 3.25)

Usage Notes

The PITIMESTAMP structure member, tzinfo, should be set to zero before calling this function if the same structure is reused. Otherwise, the information from the previous timestamp may be invalid for the current time settings.

If PITIMESTAMP is set to the ambiguous hour in the fall, the function pitm_setdst should be used to specify whether the PITIMESTAMP structure represents standard time or daylight savings time.

Enabling Operational Intelligence