Issue
The value of DateTime will different depending on how the variable is declared
Differences between DateTime declared as a local variable and as input, output or public in Script program
Product Line
EcoStruxure Building Operation
Environment
- Building Operation WorkStation
- Script Editor
Cause
Local and bound variables will initialize differently
Resolution
Local DateTime variables are local and known only to the Script program or function, and are initialized to the current local date-time value of the sever in which they execute.
Binding variables, including Input, Output and Public variables, are not effected by the Script engine by default. The EBO system uses the 1/1/1970 date as default and the Script simply uses that.
If a different initial value is required then one can be set in the script