With Maple being able to access dll functions, it is easy to produce a function giving the epoch from the date and time. I give an example here for doing that with Open Watcom compiler included in Maple's distribution for Windows. First, create a file mktime.c with the following code,
#include <time.h>

__declspec(dllexport) time_t __stdcall mk(
    int mon, int mday, int year, int hour, int min, int sec) {

    struct tm time_str;

    time_str.tm_year       = year - 1900;
    time_str.tm_mon        = mon - 1;
    time_str.tm_mday       = mday;
    time_str.tm_hour       = hour;
    time_str.tm_min        = min;
    time_str.tm_sec        = sec;
    time_str.tm_isdst      = -1;

    return( mktime(&time_str) );
}
Then in Maple, switch to the folder with this file - something like
currentdir("C:/MyProjects/C/mktime");
and make a dll,
ssystem("wcl386 -c -bd mktime.c");
ssystem("wlink system nt_dll file mktime.obj");
Then define function mktime in Maple as
mktime:=define_external( 
       'mk', 
       'mon'::integer[4], 
       'mday'::integer[4],
       'year'::integer[4],
       'hour'::integer[4],       
       'min'::integer[4],
       'sec'::integer[4],
       'RETURN'::integer[4], 
       'LIB'="C:/MyProjects/C/mktime/mktime.dll" 
);
Now, the epoch can be calculated as
mktime(8,27,2005,13,47,30);
                              1125168450
Check it with the following command,
iolib(25);
                              1125168464
Correct!

Please Wait...