com.apama.eda
Event DateTimeUtil


Utility event to perform conversion between epoch time (number of seconds elapsed since midnight, January 1, 1970 UTC) and EDA date-time string of format YYYY-MM-DDThh:mm:ss.sssTZD.

The time zone designator (indicated by TZD) can be either "Z" for indicating UTC, or "+hh:mm" or "-hh:mm" to indicate an offset from UTC. The decimal fraction of a second can be omitted, or can contain any number of digits; if it contains more than 3 digits, only the first three fractional digits are considered. e.g. 2014-05-07T17:30:21+00:00.
Action summary
 stringstatic toEdaTime(float time)

Returns the UTC date-time string of format YYYY-MM-DDThh:mm:ss.sssTZD. The time zone designator (indicated by TZD) will be "Z" to denote UTC. Only the first three fractional digits of seconds are considered.
 floatstatic toEpocTime(string time)

Returns the number of seconds elapsed since midnight, January 1, 1970 UTC for specified date-time string. Returns NaN for invalid date-time string. Only the first three fractional digits of seconds are considered.
 
Action detail

toEdaTime

string static toEdaTime(float time)
Returns the UTC date-time string of format YYYY-MM-DDThh:mm:ss.sssTZD. The time zone designator (indicated by TZD) will be "Z" to denote UTC. Only the first three fractional digits of seconds are considered.
Parameters:
time - The number of seconds and fractional seconds elapsed since midnight, January 1, 1970 UTC.

toEpocTime

float static toEpocTime(string time)
Returns the number of seconds elapsed since midnight, January 1, 1970 UTC for specified date-time string. Returns NaN for invalid date-time string. Only the first three fractional digits of seconds are considered.
Parameters:
time - The date-time string of format YYYY-MM-DDThh:mm:ss.sssTZD, e.g. 2014-05-07T17:30:21+00:00.