Metropoli BBS
VIEWER: date.c MODE: TEXT (ASCII)
/*
 * This OS/2 port was hacked by Harald Kipp from the
 *
 *      Network News Transfer Protocol server
 *
 *      Phil Lapsley
 *      University of California, Berkeley
 *      Stan Barber
 *      Baylor College of Medicine
 *
 * Bug reports related to THIS modified version should be sent to
 *
 *  harald@os2point.ping.de
 *  harald@sesam.com
 *  Fido: 2:2448/434
 *
 */

#include <stdlib.h>
#include <stdio.h>
#include <time.h>

#include <tcpconn.h>

#include "globals.h"
#include "nntp.h"
#include "changi.h"

void dodate(PNEWSCLIENT pnc, int ac, char *av[])
{
    struct tm *gmt;
    time_t now;

    time(&now);
    gmt = gmtime(&now);
    so_printf(pnc -> s, "%d %04.4d%02.2d%02.2d%02.2d%02.2d%02.2d\r\n",
	      INF_DATE,
	      gmt -> tm_year + 1900, gmt -> tm_mon + 1, gmt -> tm_mday,
	      gmt -> tm_hour, gmt -> tm_min, gmt -> tm_sec);
    if (ac && av) ;
}
[ RETURN TO DIRECTORY ]