diff --git a/pelican/utils.py b/pelican/utils.py index 4b25ec7f..2e315c3d 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -180,6 +180,8 @@ def get_date(string): If no format matches the given date, raise a ValueError. """ + if isinstance(string, datetime): + return string string = re.sub(' +', ' ', string) formats = [ # ISO 8601