Fix date parsing when there's not milliseconds in the date
Fix date parsing when there's not milliseconds in the date

When OSProfiler is converting date string to datetime format
"%Y-%m-%dT%H:%M:%S.%f", it will raise a ValueError exception if it
receives dates with the following format: "%Y-%m-%dT%H:%M:%S"

The "%Y-%m-%dT%H:%M:%S" date format applies when a notification
occurs in the exact 0 millisecond of a certain second.

Adding a try-except section for catching the exceptions when the date
format is "%Y-%m-%dT%H:%M:%S". It will try first to match with
"%Y-%m-%dT%H:%M:%S.%f" format and if it fails, it will go with the
non-milliseconds date format matching.

Closes-Bug: #1472735

Change-Id: I3fd0c3a3b26797f215d2ae7a8acc29c8619c0b68
Signed-off-by: Munoz, Obed N <6e5b23a9efbce03e6440ea9b699a6874389894d3@intel.com>

openstack/osprofiler,openstack/osprofiler,stackforge/osprofiler,stackforge/osprofiler,openstack/osprofiler,stackforge/osprofiler