I am beginner with Ignition and I have a such problem: I got a big number from PLC, like 12918834598000 which is UTC time and i need to convert it to the human readable format.
I have defined a expression for the label like runScript(“app.util.UTC_to_LocalTime()”)
And also a function in the app.util package, called UTC_to_LocalTime
print “Converting value ‘%d’ to ‘%s’%” % (1233445678, localtime(1233445678))
return time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime(epoch))
It is just for testing, since i always have error:
java.lang.Exception: Error executing expression binding on
Well, there is something wrong with the binding. Maybe toString method could be used somewhere? I just need to get to work the UTC to Local Time translation.