diff --git a/oslo_utils/timeutils.py b/oslo_utils/timeutils.py index 7a01e8f2..2b9e996d 100644 --- a/oslo_utils/timeutils.py +++ b/oslo_utils/timeutils.py @@ -119,7 +119,7 @@ def normalize_time(timestamp): def is_older_than(before, seconds): """Return True if before is older than seconds.""" if isinstance(before, six.string_types): - before = parse_strtime(before).replace(tzinfo=None) + before = parse_isotime(before).replace(tzinfo=None) else: before = before.replace(tzinfo=None) @@ -129,7 +129,7 @@ def is_older_than(before, seconds): def is_newer_than(after, seconds): """Return True if after is newer than seconds.""" if isinstance(after, six.string_types): - after = parse_strtime(after).replace(tzinfo=None) + after = parse_isotime(after).replace(tzinfo=None) else: after = after.replace(tzinfo=None)