/* sys/p2t.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */

#include <sys/emx.h>
#include <os2emx.h>
#include <time.h>
#include "syscalls.h"

long _sys_p2t (FTIME t, FDATE d)
{
  struct tm tm;

  tm.tm_sec = t.twosecs * 2;
  tm.tm_min = t.minutes;
  tm.tm_hour = t.hours;
  tm.tm_mday = d.day;
  tm.tm_mon = d.month - 1;
  tm.tm_year = d.year + 1980 - 1900;
  return (_mktime (&tm));
}
