Here's a cheap binary to print the date, since there's no /bin/date

Edit: and here's the source
#include <stdio.h>
#include <sys/types.h>

#include <time.h>

main() {
time_t when;
struct tm *tm;
time (&when);
tm = gmtime(&when);
printf("%02d/%02d/%04d %02d:%02d:%02d UTC\n", tm->tm_mday, tm->tm_mon+1, tm->tm_year+1900, tm->tm_hour, tm->tm_min, tm->tm_sec);
}


Attachments
119624-date (203 downloads)



Edited by dbrashear (16/10/2002 20:23)