Skip to content

Commit c9ef6eb

Browse files
committed
pygit2: return tz_offset in seconds from UTC
1 parent 010d96c commit c9ef6eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scmrepo/git/backend/pygit2/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,15 +401,15 @@ def resolve_commit(self, rev: str) -> "GitCommit":
401401
return GitCommit(
402402
str(commit.id),
403403
commit.commit_time,
404-
commit.commit_time_offset,
404+
commit.commit_time_offset * 60,
405405
commit.message,
406406
[str(parent) for parent in commit.parent_ids],
407407
commit.committer.name,
408408
commit.committer.email,
409409
commit.author.name,
410410
commit.author.email,
411411
commit.author.time,
412-
commit.author.offset,
412+
commit.author.offset * 60,
413413
)
414414

415415
def _get_stash(self, ref: str):
@@ -962,7 +962,7 @@ def get_tag(self, name: str) -> Optional[Union[str, "GitTag"]]:
962962
tag.tagger.name,
963963
tag.tagger.email,
964964
tag.tagger.time,
965-
tag.tagger.offset,
965+
tag.tagger.offset * 60,
966966
tag.message,
967967
)
968968
except KeyError:

0 commit comments

Comments
 (0)