diff --git a/asdf/asdf.py b/asdf/asdf.py index 0ea3b45ef..ac6da11e1 100644 --- a/asdf/asdf.py +++ b/asdf/asdf.py @@ -1336,8 +1336,9 @@ def add_history_entry(self, description, software=None): elif software is not None: software = Software(software) - time_ = datetime.datetime.utcfromtimestamp( + time_ = datetime.datetime.fromtimestamp( int(os.environ.get("SOURCE_DATE_EPOCH", time.time())), + datetime.timezone.utc ) entry = HistoryEntry(