Hi <@U0283CLRWG6>! Thanks for the warm welcome :sl...
# community
e
Hi @Alex Olivier (Cerbos)! Thanks for the warm welcome 🙂 I'm currently trying out Cerbos for an app my team is developing (i'm lead developer there). I have a simple case for the moment before considering Cerbos for further authorization process. We want to grant access to the app based on a list of users and their subscription start and end date. I've read the documentation about conditions, but I can't find the way to get the current timestamp, do I need to provide it with the request to Cerbos API?
c
Hi Elodie. There's a
timeSince
function that calculates the time elapsed from a given timestamp to now. Currently there's no function to get the current time itself but we can definitely add it.
e
My bad ! Thanks @Charith (Cerbos), I missed that line 😉
c
Does that help you write your logic?
e
Definitely 🙂
🎉 1
c
Brilliant! 🙂
Thanks for raising this BTW. We'll add functions to get the current date and time in an upcoming release.
e
Good to know thank you
a
Hi Elodie - I've just merged a pull request to add a
now()
function to get the current timestamp in conditions. This will go out in the next release 🙂
🙌 1