I wrote a UNIX utility called "epoch" that I use for tiny systems where I need to print the epoch but do not want to put a full-blown "date" command in the userland. Here is the code
int printf(const char *__restrict, ...);
unsigned int time(unsigned int *tloc);
int main(){printf("%u\n",time((unsigned int *)0));}