<div dir="ltr">Package: prometheus<br>Version: 1.5.2+ds-2<br>Severity: normal<br><br clear="all"><div><div>When I call the Prometheus HTTP API using a localized date string, the API cannot parse it to a valid timestamp. Changing the string to UTC / Zulu makes the API work.<br><br></div><div>Examples:<br><br></div><div>Invalid URL:<br></div><div><br><a href="http://localhost:9090/api/v1/query_range?query=node_load1{instance=">http://localhost:9090/api/v1/query_range?query=node_load1{instance=</a>"localhost:9100",job="node"}&start=2017-02-27T21:19:19+08:00&end=2017-02-28T00:19:19+08:00&step=60m<br><br></div><div>Response:<br></div><div><br>{"status":"error","errorType":"bad_data","error":"cannot parse \"2017-02-27T21:19:19 08:00\" to a valid timestamp"}<br></div><div><br></div><div>Valid URL:<br></div><div><br></div><div><a href="http://localhost:9090/api/v1/query_range?query=node_load1{instance=">http://localhost:9090/api/v1/query_range?query=node_load1{instance=</a>"localhost:9100",job="node"}&start=2017-02-27T13:20:02Z&end=2017-02-27T16:20:02Z&step=60m<br><br>Valid response:<br><br>{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"node_load1","instance":"localhost:9100","job":"node"},"values":[[1488205202,"0.1"],[1488208802,"0"],[1488212402,"0"]]}]}}<br><br></div><div>-- System Information:<br>Debian Release: 9.0<br>  APT prefers unstable<br>  APT policy: (500, 'unstable')<br>Architecture: amd64 (x86_64)<br><br>Kernel: Linux 4.9.0-1-amd64 (SMP w/2 CPU cores)<br>Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)<br>Shell: /bin/sh linked to /bin/dash<br>Init: systemd (via /run/systemd/system)<br><br>Versions of packages prometheus depends on:<br>ii  daemon                                   0.6.4-1<br>ii  libc6                                    2.24-9<br>ii  libjs-bootstrap                          3.3.7+dfsg-2<br>ii  libjs-eonasdan-bootstrap-datetimepicker  4.17.43-1<br>ii  libjs-jquery                             3.1.1-2<br>ii  libjs-jquery-hotkeys                     0~20130707+git2d51e3a9+dfsg-2<br>ii  libjs-moment                             2.17.1+ds-1<br>ii  libjs-mustache                           2.3.0-2<br>ii  libjs-rickshaw                           1.5.1.dfsg-1<br><br>Versions of packages prometheus recommends:<br>ii  prometheus-node-exporter  0.13.0+ds-1<br><br>prometheus suggests no packages.<br><br>-- no debconf information<br><br><br>-- <br><div class="gmail_signature">Edward C. Lang<br><br><a href="http://edlang.org/" target="_blank">http://edlang.org/</a></div>
</div></div></div>