diff --git a/lib/tfw/components/snapshot_provider.py b/lib/tfw/components/snapshot_provider.py index aa9bb1f..f0cd6ba 100644 --- a/lib/tfw/components/snapshot_provider.py +++ b/lib/tfw/components/snapshot_provider.py @@ -8,6 +8,8 @@ from os.path import isdir from datetime import datetime from uuid import uuid4 +from dateutil import parser as dateparser + class SnapshotProvider: def __init__(self, directory, git_dir): @@ -109,7 +111,7 @@ class SnapshotProvider: self._snapshot() def _checkout_new_branch_from_head(self): - branch_name = uuid4() + branch_name = str(uuid4()) self._run(( 'git', 'branch', branch_name @@ -174,7 +176,7 @@ class SnapshotProvider: commit_hash, timestamp = line.split('@') commits.append({ 'hash': commit_hash, - 'timestamp': datetime.fromisoformat(timestamp) + 'timestamp': dateparser.parse(timestamp) }) return commits