diff --git a/nvchecker/source/github.py b/nvchecker/source/github.py index c77f1d8..191bddc 100644 --- a/nvchecker/source/github.py +++ b/nvchecker/source/github.py @@ -39,5 +39,5 @@ def _github_done(name, use_latest_release, use_max_tag, ignored_tags, callback, else: # YYYYMMDD.HHMMSS version = data[0]['commit']['committer']['date'] \ - .replace('-', '').replace(':', '').replace('T', '.') + .rstrip('Z').replace('-', '').replace(':', '').replace('T', '.') callback(name, version) diff --git a/tests/test_github.py b/tests/test_github.py index 2d2146d..b4ebb52 100644 --- a/tests/test_github.py +++ b/tests/test_github.py @@ -7,7 +7,7 @@ from tests.helper import ExternalVersionTestCase reason="requires NVCHECKER_GITHUB_TOKEN, or it fails too much") class GitHubTest(ExternalVersionTestCase): def test_github(self): - self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo"}), "20140122") + self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo"}), "20140122.012101") def test_github_latest_release(self): self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo", "use_latest_release": 1}), "release3")