Skip to content

Commit

Permalink
fix(changelog-generation): fix incorrect release timezone determination
Browse files Browse the repository at this point in the history
  • Loading branch information
codejedi365 committed Feb 13, 2024
1 parent 3a012a7 commit 6f88e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions semantic_release/changelog/release_history.py
Expand Up @@ -81,15 +81,15 @@ def from_git_history(
if isinstance(tag.object, TagObject):
tagger = tag.object.tagger
committer = tag.object.tagger.committer()
_tz = timezone(timedelta(seconds=tag.object.tagger_tz_offset))
_tz = timezone(timedelta(seconds=-1 * tag.object.tagger_tz_offset))
tagged_date = datetime.fromtimestamp(
tag.object.tagged_date, tz=_tz
)
else:
# For some reason, sometimes tag.object is a Commit
tagger = tag.object.author
committer = tag.object.author
_tz = timezone(timedelta(seconds=tag.object.author_tz_offset))
_tz = timezone(timedelta(seconds=-1 * tag.object.author_tz_offset))
tagged_date = datetime.fromtimestamp(
tag.object.committed_date, tz=_tz
)
Expand Down

0 comments on commit 6f88e0d

Please sign in to comment.