DNPTIME Convert
unsigned int ComputeDayOfYear(unsigned short year, unsigned short mon, unsigned short day ) { return ((mon * 275 / 9) - (((mon + 9) / 12) * (1 + (((year % 4) + 2) / 3))) + day - 30); } void conv_dnp_to_gmt(unsigned char *buf, unsigned short *pSysTime) { unsigned int lsg, msg, lval; unsigned short year=0,mon=0,day=0,hour=0,min=0,sec=0,msec=0; lsg = buf[0] | (buf[1] >24) & 0xff; memcpy(&buf[2], &w..
2020. 11. 3.