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.
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 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.