Elapsed Time

I want to calculate the time that has elapsed (in seconds) since the last update of a SQLTag using a Python script. That is, I want the difference between time.time() and myTag.LastChange, but I’m stumped on how to convert myTag.LastChange to epoch time.

lastChange is a Java Date. use the .getTime() function to return it as a UTC epoch-based timestamp. In Java, the epoch is Jan 1, 1970 and the resolution is milliseconds.