I have a code in python which I use to retrieve issues from redmine project.
I am using the python-redmine library.
My code is as below:
from redminelib import Redmine
from datetime import datetime
from datetime import timedelta
time = datetime.now()
checktime = time -timedelta(minutes = 5)
redmine = Redmine('*redmine url*',key = '*admin key*')
issues = redmine.issue.filter(project_id = "*project*", status_id = "1", created_on = '>=%s'%checktime.strftime('%Y-%m-%dT%H:%M:%SZ'))
for issue in issues:
*rest of code*
The requirement is to fetch redmine issues created in the last five minutes. However no record is being fetched in the above code.
If i use:
issues = redmine.issue.filter(project_id = "*project*", status_id = "1", created_on = '>=%s'%checktime.strftime('%Y-%m-%d'))
records are being fetched - albeit for the whole day.
Could someone point out what is incorrect in the time filter which is preventing the redmine records from being retrieved.
The datetime format in the redmine instance is 2017-08-18 16:31:04