| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 1.91

 

date_to_timer

#include "sfldate.h"
time_t
date_to_timer (long date, long time)

Synopsis

Converts the supplied date and time into a time_t timer value. This is the number of non-leap seconds since 00:00:00 GMT Jan 1, 1970. Function was rewritten by Bruce Walter walter@fortean.com.

Source Code - (sfldate.c)

{
    struct tm
        time_struct;

    time_struct.tm_sec   = GET_SECOND (time);
    time_struct.tm_min   = GET_MINUTE (time);
    time_struct.tm_hour  = GET_HOUR   (time);
    time_struct.tm_mday  = GET_DAY    (date);
    time_struct.tm_mon   = GET_MONTH  (date);
    time_struct.tm_year  = GET_YEAR   (date);
    time_struct.tm_isdst = -1;
    return (mktime (&time_struct));
}

| << | < | > | >> iMatix Copyright © 1996-98 iMatix