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

 

timer_to_date

#include "sfldate.h"
long
timer_to_date (time_t time_secs)

Synopsis

Converts the supplied timer value into a long date value. Dates are stored as long values: CCYYMMDD. If the supplied value is zero, returns zero. The timer value is assumed to be UTC (GMT).

Source Code - (sfldate.c)

{
    struct tm
        *time_struct;

    if (time_secs == 0)
        return (0);
    else
      {
        /*  Convert into a long value CCYYMMDD                               */
        time_struct = safe localtime (&time_secs);
        time_struct-> tm_year += 1900;
        return (MAKE_DATE (time_struct-> tm_year / 100,
                           time_struct-> tm_year % 100,
                           time_struct-> tm_mon + 1,
                           time_struct-> tm_mday));
      }
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation