[Openstack] [ceilometer] ceilometer parse UTC timestamp unreasonably

刘胜 liusheng1175 at 126.com
Tue Jan 7 09:58:28 UTC 2014


hi all:I have report a bug:https://bugs.launchpad.net/ceilometer/+bug/1266398When using “ceilometer statistics -m instance -q "start=2011114-01-03T01:45:49" ” The ceilometer parse a invalid UTC timestamp with no error.I have analysed the code about "statistics",the ceilometer use iso8601 python lib to parse the UTC time.But, the method iso8601.parse_date() parse "2011114-01-03T01:45:49" to "2011-11-04 00:00:00+00:00" . So, this problem occoured.While, I have tested the method with two lines of codes:import iso8601print iso8601.parse_date(u"201114-01-03T01:45:49")It resulted error:"iso8601.iso8601.ParseError: month must be in 1..12"But, after I modified the year in timestamp,like this:import iso8601print iso8601.parse_date(u"20114-01-03T01:45:49")the result is:"2011-04-01 00:00:00+00:00"

So, it is a bug of iso8601 python lib?if it is,how to fix the bug?


Anyone have good idea?



Best Regards 
liusheng 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140107/14726f42/attachment.html>


More information about the Openstack mailing list