#include "nist.h"

char
    *month[] =
    {
        "Jan",
        "Feb",
        "Mar",
        "Apr",
        "May",
        "Jun",
        "Jul",
        "Aug",
        "Sep",
        "Oct",
        "Nov",
        "Dec"
    };

int linuxserver(char *cmd)
{
    char
        day[100],
        mon[100];

    if
    (
        sscanf
        (
            cmd,
            "%s %s %u %u:%u:%u %u"
            , day
            , mon
            , &dd
            , &hh
            , &mm
            , &ss
            , &yy
        ) != 7
    )
        return (0);                         /* this line wasn't the time */

    for (mo = 0; strcmp(mon, month[mo]); mo++)
        ;

    mo++;

    yy -= 1900;                             /* century info ok      */

    return (1);                             /* timeline found */
}
