Applies To:
  • CitectSCADA 5.xx, 5.00, 5.01

Summary:
TimeSet() Cicode function lets users set invalid time/date resulting in the time being set to 1970.  

Solution:
CIT has confirmed this to be a problem in Citect for Windows versions to 5.01. This problem has been fixed in version 5.10.

The TimeSet() Cicode function has been modified so that it will not set the system time to before 1980 or after 2037. Instead it will return -1.

The StrtoDate() Cicode function will return -1 when you call it with a year before 1980 or after 2037.

The utility page in the Example project allows you to change the system time. This Cicode has been modified to check if you enter an invalid year.

IF StrToDate(Arg1) > 0 THEN
    TimeSet(StrToTime(Time())+StrToDate(Arg1),0);
ELSE
    Message("Enter Date","@(Value out of Range)",48);
END

 

Keywords:
 

Attachments