To answer my own question:
Pass down the ActiveObject that is creating the class in the class constructor, and (assuming objActiveObject is the
ActiveObject you are passing in) use:
objActiveObject.getEngine().time()
In other words, time(), date(), etc. are methods of the Engine class, and you need to get the current Engine for the
simulation you're running, so use the getEngine method of an ActiveObject to let the class know which engine to use.
Hope this helps someone else!

