/* Copyright (c) 1982 Regents of the University of California */ static char sccsid[] = "@(#)mkdate.c 1.2 07/03/83"; #include #include 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); gethostname(name, &namelen); printf(" (%s)", name); printf("\";\n"); }