=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/timestamp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/make/timestamp.c 2004/04/07 13:11:36 1.2 +++ src/usr.bin/make/timestamp.c 2007/09/16 12:09:36 1.3 @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: timestamp.c,v 1.2 2004/04/07 13:11:36 espie Exp $ */ +/* $OpenBSD: timestamp.c,v 1.3 2007/09/16 12:09:36 espie Exp $ */ /* * Copyright (c) 2001 Marc Espie. @@ -52,3 +52,19 @@ return utime(f, ×); #endif } + +char * +time_to_string(TIMESTAMP time) +{ + struct tm *parts; + static char buf[128]; + time_t t; + + t = timestamp2time_t(time); + + parts = localtime(&t); + strftime(buf, sizeof buf, "%H:%M:%S %b %d, %Y", parts); + buf[sizeof(buf) - 1] = '\0'; + return buf; +} +