cleanup, add manual pages
[unix-history] / usr / src / old / dbx / mkdate.c
CommitLineData
2a24676e
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6863f426 6
2a24676e 7#ifndef lint
9606e7b9 8static char sccsid[] = "@(#)mkdate.c 5.3 (Berkeley) %G%";
2a24676e 9#endif not lint
0022c355 10
9606e7b9 11static char rcsid[] = "$Header: mkdate.c,v 1.2 87/03/26 19:56:22 donn Exp $";
6863f426
ML
12
13#include <stdio.h>
9606e7b9
DS
14#ifdef IRIS
15# include <time.h>
16#else
17# include <sys/time.h>
18#endif
6863f426
ML
19
20main()
21{
22 struct tm *t;
23 long clock;
24 char name[100];
25 int namelen;
26
27 printf("char *date = \"");
28 clock = time(0);
29 t = localtime(&clock);
30 printf("%d/%d/%d ", t->tm_mon + 1, t->tm_mday, t->tm_year % 100);
31 printf("%d:%02d", t->tm_hour, t->tm_min);
9606e7b9
DS
32# ifndef IRIS
33 gethostname(name, &namelen);
34 printf(" (%s)", name);
35# endif
6863f426 36 printf("\";\n");
195427a4 37 exit(0);
2fd0f574 38}