respect timezone when handeling git commit times (#4997)

This commit is contained in:
Matthias Mair 2023-06-08 14:00:54 +02:00 committed by GitHub
parent bae1c239e8
commit e807339c55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,11 @@
Provides information on the current InvenTree version
"""
import datetime
import os
import pathlib
import re
from datetime import datetime as dt
from datetime import timedelta as td
import django
@ -126,4 +127,6 @@ def inventreeCommitDate():
if main_commit is None:
return None
return str(datetime.datetime.fromtimestamp(main_commit.commit_time).date())
commit_dt = dt.fromtimestamp(main_commit.commit_time) + td(seconds=main_commit.commit_timezone)
return str(commit_dt.date())