I am trying to build a service which to scan all the transaction for the past 1 hour or 30 minutes until now.
Basically for this service i have 2 inputs:
start_date = last 1 hour or 30 minutes from now
end_date = current date time
For the “end_date”, i can use: pub.date:getCurrentDateString
But i am still doubt, how can i construct “start_date” which is current datetime minus 1 hour or 30 minutes from now?
I don’t think the service pub.date:calculateDateDifference can do this either.
Any idea on built in services to construct the “start_date”?