1: /* Simple C program to display the current "Unix time", 2: * The number of seconds since the Epoch (Midnight 1/1/1970 UTC). 3: * Although Gnu date has a "%s" format option for this, it isn't 4: * standard in POSIX/SUS. 5: * 6: * Written 8/2009 by Wayne Pollock, Tampa Florida USA 7: */ 8: 9: #include <stdlib.h> 10: #include <stdio.h> 11: #include <time.h> 12: 13: int main ( void ) { 14: printf( "%i\n", (int) time( NULL ) ); 15: return 0; 16: }