Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add stateless function now() to get the current local time #1549

Closed
mbresson opened this issue Sep 7, 2017 · 0 comments
Closed

Comments

@mbresson
Copy link
Contributor

mbresson commented Sep 7, 2017

Hi,
it would be nice to have a function now() returning the current local time, as it could be used in conjunction with unixNano() to create alert conditions by comparing a timestamp stored in any field with the current time (as discussed in this discussion thread).

For instance, it could be used like so:

batch
  |query('''SELECT * FROM "mydb"."autogen"."subscription"''')
    .period(10h)
    .every(10s)
  |alert()
    .crit(lambda: "expiration" < unixNano(now()))
    .log('/tmp/dates-alerts.log')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants