<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">út 27. 9. 2016 v 18:05 odesílatel Doug Hellmann <<a href="mailto:doug@doughellmann.com">doug@doughellmann.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Excerpts from milanisko k's message of 2016-09-27 12:30:09 +0000:<br>
> Hello Stackers!<br>
><br>
> The ironic inspector project keeps track of introspection finished_at time<br>
> stamps.<br>
> We're just discussing how to reasonably query time ranges over the API[1]<br>
> to serve matching introspection statuses to the user.<br>
> Wikipedia[2] mentions the ISO8601 time interval specification (and there<br>
> are open-interval extensions to that).<br>
> It would be nice to be able to specify a query like :<br>
>      /v1/introspection?finished_at=2016:09:27:14:17/PT1H<br>
> to fetch all introspection statuses that finished within 1hour around 14:17<br>
> Today,<br>
> or to be able to state an open-ended interval:<br>
>     /v1/introspection?finished_at=2016:09:27:14:17/<br>
> but oslo_utils.timeutils lacks parsing support for ISO8061 time intervals.<br>
><br>
> I'd like to ask whether other projects need to parse time intervals and/or<br>
> how do they achieve that.<br>
><br>
> Thanks!<br>
> milan<br>
><br>
> [1]<br>
> <a href="https://review.openstack.org/#/c/375045/3/specs/list-introspection-statuses.rst" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/375045/3/specs/list-introspection-statuses.rst</a><br>
> [2] <a href="https://en.wikipedia.org/wiki/ISO_8601#Time_intervals" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/ISO_8601#Time_intervals</a><br>
<br>
You may want to have a look at the dateutil library.<br>
<a href="https://dateutil.readthedocs.io/en/stable/" rel="noreferrer" target="_blank">https://dateutil.readthedocs.io/en/stable/</a><br>
<br></blockquote><div>Doug, I'm afraid that dateutil.parser.parse doesn't support intervals either: <a href="http://paste.openstack.org/show/583452/">http://paste.openstack.org/show/583452/</a><br></div><div>Is there any interest in oslo_utils.timeutils parsing ISO8601 time intervals as in [2]?<br></div><div>What do OS projects use instead especially w/r http api queries?<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Doug<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div>