clinks.u4.v = date_to_clinks(date.i1a.r [,status.i4.r])
This routine converts a date string having the format
"dd-Mmm-yyyy hh:mm:ss" to clinks. Please see clinks_now for
the definition of clinks.
The date is assumed to be local time. Here is how the routine
handles the anomalies of daylight savings time (DST).
1. Some local times never occur because they are skipped in the
transition to DST (Spring forward). The routine will set
status to CBS_RANGE for such times.
2. Some local times happen twice because they are replayed
immediately after the transition from DST (Fall back). This
routine does allow one to distinguish between the repeated
times by replacing the both of the two ":" characters in the
time with ";" characters. Use ";" for the first occurrence,
which is the occurrence in CDT. Use ":" for the the second
occurrence, which is the occurrence in CST.
date ASCII date string (DATE_STRING_LEN characters)
[status] conversion status
(OK -> successful conversion,
CBS_INVSIZ -> supplied date string is too short,
CBS_NO_SUCH -> invalid month string,
CBS_RANGE -> invalid year, day, hour, minute,
This function returns status values as follows:
number of clinks corresponding to the supplied date string
This function requires the following include files:
traditional_date_to_clinks, clinks_to_date, clinks_now,
clinks_to_day_of_week_c, clinks_is_dst_c, get_date_clinks,
db_date_to_clinks, db_date_to_date_c, convert_seconds_c,
static const char date[DATE_STRING_LEN+1] = "16-SEP-1997 16:00:00";
unsigned int clinks;
clinks = date_to_clinks(date,&status);