FATOTIME C-3


NAME



fatotime - convert ASCII to time value

SYNOPSIS



#include

int fatotime (sptr, format, t, size)
char *sptr;
char *format;
TIME *t;
int size;

DESCRIPTION



Fatotime converts a string pointed to by sptr to a TIME value
using format to control the conversion. The result of the
conversion is stored in the TIME value pointed at by t. Size is
the size of the TIME value.

Time values are stored internally as the number of seconds from
midnight. Midnight has a value of 1. This format allows
comparison of two time values and time arithmetic.

Fatotime first tries to convert sptr with format. If this fails,
a standard input format of the form hh[:]mm[:]ss[cycle] is used.
The : character can be any punctuation character or none at all.
Minutes, mm , are required only if seconds, ss , are entered. In
addition, the time cycle,
cycle , can also be entered. If entered, cycle is compared case
insensitively against the values returned by getfcycle(C-3). The
hours range from 1am to noon and 1pm to midnight. Noon is 12pm,
and midnight is 12am. If the time cycle is not entered, the time
is assumed to be in 24 hour format, i.e., the hours go from 0 to
23.

SEE ALSO



fcountry(C-3), getfcycle(C-3), atotime(C-3)