#!/usr/bin/env cscript #include <stdio.h> #include <strings.h> #include <time.h> int main(int argc, char *argv[]) { int epoch = 42683; char format[64]; struct tm value; bzero(&value, sizeof(struct tm)); value.tm_year = 1900 - 1900; value.tm_mon = 0; value.tm_mday = 1 + epoch * 60 * 60 * 24; strftime(format, sizeof(format), "%Y%m%d", &value); puts(format); }