diff --git a/package_control/clients/github_client.py b/package_control/clients/github_client.py index cc25e082..a6f0f30f 100644 --- a/package_control/clients/github_client.py +++ b/package_control/clients/github_client.py @@ -187,7 +187,7 @@ def _get_releases(user_repo, tag_prefix=None, page_size=1000): version, tag, tag_url = release if is_client: - timestamp = 0 + timestamp = '1970-01-01 00:00:00' else: tag_info = self.fetch_json(tag_url) timestamp = tag_info['commit']['committer']['date'][0:19].replace('T', ' ') diff --git a/package_control/providers/repository_provider.py b/package_control/providers/repository_provider.py index c6fabf01..565a453b 100644 --- a/package_control/providers/repository_provider.py +++ b/package_control/providers/repository_provider.py @@ -787,8 +787,9 @@ def has_broken_release(): # Extract a date from the newest release date = '1970-01-01 00:00:00' for release in info['releases']: - if 'date' in release and release['date'] > date: - date = release['date'] + release_date = release.get('date') + if release_date and isinstance(release_date, str) and release_date > date: + date = release_date info['last_modified'] = date output[info['name']] = info