Skip to content

Commit e7f0b4b

Browse files
Merge pull request #428 from pypa/bugfix/427-utc-mismatch
Generate the date for today in UTC
2 parents 2732199 + 49b9ed3 commit e7f0b4b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

testing/test_git.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from setuptools_scm.utils import do
55
from setuptools_scm import git
66
import pytest
7-
from datetime import date
7+
from datetime import datetime
88
from os.path import join as opj
99
from setuptools_scm.file_finder_git import git_find_files
1010

@@ -113,7 +113,8 @@ def test_git_dirty_notag(wd):
113113
wd.write("test.txt", "test2")
114114
wd("git add test.txt")
115115
assert wd.version.startswith("0.1.dev1")
116-
today = date.today()
116+
# the date on the tag is in UTC
117+
today = datetime.utcnow().date()
117118
# we are dirty, check for the tag
118119
assert today.strftime(".d%Y%m%d") in wd.version
119120

0 commit comments

Comments
 (0)