#!/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(time_t)); value.tm_mday += epoch * 1000 * 60 * 60 * 24; strftime(format, sizeof(format), "%Y%m%d%H%M%S", &value); puts(format); }