/* $Header:mkdate.c 12.0$ */
/* $ACIS:mkdate.c 12.0$ */
/* $Source: /ibm/acis/usr/src/ucb/dbx/RCS/mkdate.c,v $ */

#ifndef lint
static char *rcsid = "$Header:mkdate.c 12.0$";
#endif

/* Copyright (c) 1982 Regents of the University of California */

#include <stdio.h>
#ifdef IRIS
#   include <time.h>
#else
#   include <sys/time.h>
#endif

main()
{
    struct tm *t;
    long clock;
    char name[100];
    int namelen;

    printf("char *date = \"");
    clock = time(0);
    t = localtime(&clock);
    printf("%d/%d/%d ", t->tm_mon + 1, t->tm_mday, t->tm_year % 100);
    printf("%d:%02d", t->tm_hour, t->tm_min);
#   ifndef IRIS
	gethostname(name, &namelen);
	printf(" (%s)", name);
#   endif
    printf("\";\n");
    exit(0);
}
