From 49b9ed36e3fd92ddf1c62a5ddedb7019b300eb79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 May 2020 21:05:41 -0400 Subject: Generate the date for today in UTC. Fixes #427. --- testing/test_git.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/test_git.py b/testing/test_git.py index ac45b5b..2e86efb 100644 --- a/testing/test_git.py +++ b/testing/test_git.py @@ -4,7 +4,7 @@ from setuptools_scm import integration from setuptools_scm.utils import do from setuptools_scm import git import pytest -from datetime import date +from datetime import datetime from os.path import join as opj from setuptools_scm.file_finder_git import git_find_files @@ -113,7 +113,8 @@ def test_git_dirty_notag(wd): wd.write("test.txt", "test2") wd("git add test.txt") assert wd.version.startswith("0.1.dev1") - today = date.today() + # the date on the tag is in UTC + today = datetime.utcnow().date() # we are dirty, check for the tag assert today.strftime(".d%Y%m%d") in wd.version -- cgit v1.2.1