%pubx04_conv

%             //Use this for serial port PUBX,04
%             //int hour = (inSB[9] - 48) * 10 + (inSB[10] - 48);
%             //int minute = (inSB[11] - 48) * 10 + (inSB[12] - 48);
%             //int second = (inSB[13] - 48) * 10 + (inSB[14] - 48);
%             //int day = (inSB[19] - 48) * 10 + (inSB[20] - 48);
%             //int month = (inSB[21] - 48) * 10 + (inSB[22] - 48);
%             //int year = 2000 + (inSB[23] - 48) * 10 + (inSB[24] - 48);
% 
%             //Use this for I2C PUBX,04
%             if (inSB.Length >= 23)
%             {
%                 int hour = (inSB[7] - 48) * 10 + (inSB[8] - 48);
%                 int minute = (inSB[9] - 48) * 10 + (inSB[10] - 48);
%                 int second = (inSB[11] - 48) * 10 + (inSB[12] - 48);
%                 int day = (inSB[17] - 48) * 10 + (inSB[18] - 48);
%                 int month = (inSB[19] - 48) * 10 + (inSB[20] - 48);
%                 int year = 2000 + (inSB[21] - 48) * 10 + (inSB[22] - 48);
% 
%                 pubx04DateTime = new DateTime(year, month, day, hour, minute, second);
%                 Utility.SetLocalTime(pubx04DateTime);
%                 RealTimeClock.SetDateTime(pubx04DateTime);
%                 //Debug.Print("setSystemTime inSB" + inSB.ToString() + "  Time: "+ hour.ToString() + minute.ToString() + second.ToString() + "  Date: " +
%                 //                year.ToString() + month.ToString() + day.ToString());
%             }


inSB = '175406.00';

hour = (inSB[1] - 48) * 10 + (inSB[2] - 48);
minute = (inSB[3] - 48) * 10 + (inSB[4] - 48);
second = (inSB[5] - 48) * 10 + (inSB[6] - 48);
day = (inSB[7] - 48) * 10 + (inSB[20] - 48);
month = (inSB[9] - 48) * 10 + (inSB[10] - 48);
year = 2000 + (inSB[11] - 48) * 10 + (inSB[12] - 48);
