DatetimeToHasptime Function

Description

Converts a date and time value to hasptime (the number of elapsed seconds since January 1 1970).

Syntax

hasp_status_t HASP_CALLCONV hasp_datetime_to_hasptime (
        unsigned int  day,
        unsigned int  month,
        unsigned int  year,
        unsigned int  hour,
        unsigned int  minute,
        unsigned int  second,
        hasp_time_t *  time,
        )

Parameters

day

Input for day value (range 1-31)

month

Input for month value (range 1-12)

year

Input for year value (range 1970+)

hour

Input for hour value (range 0-23)

minute

Input for minute value (range 0-59)

second

Input for second value (range 0-59)

time

Pointer to the resulting time value

Return Values

HASP_STATUS_OK

HASP_INV_TIME

Usage Notes

The converted date and time value reflects the number of elapsed seconds since January 1, 1970. This conversion function is used in conjunction with the API functions that set or retrieve values for the real-time clock (RTC) in the Sentinel HL Time key and Sentinel HL NetTime key.

Related Topics

HasptimeToDatetime Function

GetRealTimeClock Function