siddhi-io / siddhi-execution-time

Extension that provides time-related functionalities
https://siddhi-io.github.io/siddhi-execution-time
Apache License 2.0
3 stars 30 forks source link

Introduce timezone to time:currentTimestamp function #42

Closed minudika closed 5 years ago

minudika commented 5 years ago

Purpose

Introduce timezone to time:currentTimestamp function

Goals

This allows providing timezone as an argument to time:currentTimestamp() function. Then it converts the current system time to the given time zone and returns in yyyy-MM-dd HH:mm:ss format.

Eg:

define stream InputStream (symbol string, price long, volume long);
from InputStream
select symbol , time:currentTimestamp() as currentTimestamp
insert into OutputStream;

This query returns, symbol from the 'InputStream' and the current timestamp of the system in yyyy-MM-dd HH:mm:ss format as currentTimestamp, to the 'OutputStream'.

Security checks