121612Sdist /* 221612Sdist * Copyright (c) 1983 Regents of the University of California. 321612Sdist * All rights reserved. The Berkeley software License Agreement 421612Sdist * specifies the terms and conditions for redistribution. 521612Sdist */ 611802Slinton 721612Sdist #ifndef lint 8*33325Sdonn static char sccsid[] = "@(#)mkdate.c 5.3 (Berkeley) 01/12/88"; 921612Sdist #endif not lint 1011802Slinton 11*33325Sdonn static char rcsid[] = "$Header: mkdate.c,v 1.2 87/03/26 19:56:22 donn Exp $"; 1218225Slinton 1311802Slinton #include <stdio.h> 14*33325Sdonn #ifdef IRIS 15*33325Sdonn # include <time.h> 16*33325Sdonn #else 17*33325Sdonn # include <sys/time.h> 18*33325Sdonn #endif 1911802Slinton 2011802Slinton main() 2111802Slinton { 2211802Slinton struct tm *t; 2311802Slinton long clock; 2411802Slinton char name[100]; 2511802Slinton int namelen; 2611802Slinton 2711802Slinton printf("char *date = \""); 2811802Slinton clock = time(0); 2911802Slinton t = localtime(&clock); 3011802Slinton printf("%d/%d/%d ", t->tm_mon + 1, t->tm_mday, t->tm_year % 100); 3111802Slinton printf("%d:%02d", t->tm_hour, t->tm_min); 32*33325Sdonn # ifndef IRIS 33*33325Sdonn gethostname(name, &namelen); 34*33325Sdonn printf(" (%s)", name); 35*33325Sdonn # endif 3611802Slinton printf("\";\n"); 3732081Sbostic exit(0); 3811802Slinton } 39