diff --git a/pyproject.toml b/pyproject.toml index bede88e..e615b45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rdflib-ocdm" -version = "0.3.5" +version = "0.3.6" description = "" authors = ["arcangelo7 "] license = "ISC" diff --git a/rdflib_ocdm/ocdm_graph.py b/rdflib_ocdm/ocdm_graph.py index 4f9e404..5631c2c 100644 --- a/rdflib_ocdm/ocdm_graph.py +++ b/rdflib_ocdm/ocdm_graph.py @@ -22,7 +22,7 @@ from typing import List, Tuple, Optional from copy import deepcopy -from datetime import datetime, timezone +from datetime import datetime, timezone, timedelta from rdflib import ConjunctiveGraph, Graph, URIRef @@ -47,9 +47,9 @@ def preexisting_finished(self: Graph|ConjunctiveGraph|OCDMGraphCommons, resp_age count = self.provenance.counter_handler.read_counter(subject) if count == 0: if c_time is None: - cur_time: str = datetime.now(tz=timezone.utc).replace(microsecond=0).isoformat(sep="T") + cur_time: str = (datetime.now(tz=timezone.utc).replace(microsecond=0) - timedelta(seconds=5)).isoformat(sep="T") else: - cur_time: str = datetime.fromtimestamp(c_time, tz=timezone.utc).replace(microsecond=0).isoformat(sep="T") + cur_time: str = (datetime.fromtimestamp(c_time, tz=timezone.utc).replace(microsecond=0) - timedelta(seconds=5)).isoformat(sep="T") new_snapshot: SnapshotEntity = self.provenance._create_snapshot(subject, cur_time) new_snapshot.has_description(f"The entity '{str(subject)}' has been created.")