/*
 * Copyright (c) 1992 MCNC, CONCERT Network
 * All rights reserved.
 *
 * Permission to use, copy, modify, and distribute this software and
 * its documentation for any purpose and without fee is hereby granted,
 * provided that the above copyright notice appears in all copies and
 * that both the copyright notice and this permission notice appear in
 * supporting documentation.  MCNC makes no representations about the
 * suitability of this software for any purpose. It is provided "as is"
 * without express or implied warranty.
 *
 */

/************************************************************************
 * cvt_time
 *
 * Convert date/time to number of seconds
 *
 * cvt_time date
 *              date - mmm dd hh:mm 19yy
 *
 *       Author:         Tom Sandoski
 *       Released:       03/30/93
 *
 ************************************************************************/

#include <stdio.h>
#include <strings.h>
#include <signal.h>
#include <time.h>

main(argc, argv)
int     argc;
char    *argv[];
{
        char            *tdate;
        time_t          otime;
	struct tm	timebuf;
	struct tm	*ptbuf;


        tdate = argv[1];
	ptbuf = &timebuf;
        strptime(tdate, "%h %e %H:%M:%S %Y", ptbuf);
        otime = timelocal(ptbuf);
	printf("%d", otime);
	exit(0);

}
