http://www.ousob.com --- Legacy Redefined #include <dos.h> #include <nit.h> #include <extend50.h> CLIPPER b_sysdttm() { BYTE dateAndTime[7]; WORD year; WORD ConnectionNumber; struct dostime_t time; struct dosdate_t date; ConnectionNumber = GetConnectionNumber(); if( ConnectionNumber == 0 ){ _retl(0); return; } GetFileServerDateAndTime(dateAndTime); year = dateAndTime[0]; if( year < 82 ){ year = (WORD)(year + 2000); } else{ year = (WORD)(year + 1900); } time.hour = dateAndTime[3]; time.minute = dateAndTime[4]; time.second = dateAndTime[5]; time.hsecond = 0; date.month = dateAndTime[1]; date.day = dateAndTime[2]; date.year = (WORD)year; if( (_dos_setdate(&date) != 0) || (_dos_settime(&time) != 0) ){ _retl(0); return; } _retl(1); }