Not sure how GitLab writes its date strings, but I think it may vary based on installation and server configuration. The previous hard-coded format string failed for me with:
ValueError: time data '2016-04-21T15:09:38.552-07:00' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'
I don't know of a good native fix for this, as strptime does not seem to support the above style of timezone off-set formatting, so I think it may be worth adding the trusty python-dateutil package to the dependencies for all-purpose date string parsing.
I'm also not sure how this script ever worked since the default date filter is naive and the format string is timezone aware. So I stripped tzinfo from the GL time data, since the expected date_filter parameter is YYYY-MM-DD anyway.
Not sure how GitLab writes its date strings, but I think it may vary based on installation and server configuration. The previous hard-coded format string failed for me with:
I don't know of a good native fix for this, as
strptime
does not seem to support the above style of timezone off-set formatting, so I think it may be worth adding the trusty python-dateutil package to the dependencies for all-purpose date string parsing.I'm also not sure how this script ever worked since the default date filter is naive and the format string is timezone aware. So I stripped
tzinfo
from the GL time data, since the expecteddate_filter
parameter isYYYY-MM-DD
anyway.Sound good?