Developing Apama Applications > Developing Apama Applications in EPL > Using Correlator Plug-ins in EPL > Using the Time Format plug-in > getTime()
getTime()
The getTime() function returns the local time as a float of seconds since the epoch (UTC).
Syntax
float getTime()
This value has the same format as the currentTime variable. However, the getTime() function returns the actual local time whereas the currentTime variable contains the time that the event being processed was received by the correlator. The time returned by the getTime() function is accurate to the millisecond except on Windows. On Windows, it returns a time that is accurate to within 10 or 16 milliseconds depending on the machine configuration and Windows version it is running on.
The Windows and UNIX versions of the Time Format plug-in are not guaranteed to return the same time all the time. This is because the underlying system libraries that the plug-in relies on have different interpretations of what constitutes local time in certain country locales, in particular during summer time. This discrepancy is caused by the fact that at the epoch, January 1st 1970, Great Britain was temporarily one hour ahead of UTC. Some UNIX system libraries, like those on Solaris, account for this, others, like that on Windows, do not.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.