Skip to content

Commit 8755b54

Browse files
committed
Fix failing tests
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 26379a9 commit 8755b54

20 files changed

+1686
-1698
lines changed

src/fetchcode/package.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ def get_htmllisting_data_from_purl(purl):
10101010
package_url
10111011
)
10121012

1013+
10131014
def get_packages_from_listing(purl, source_archive_url, regex, ignored_files_and_dir):
10141015
"""
10151016
Return list of package data from a directory listing based on the specified regex.
@@ -1029,7 +1030,7 @@ def get_packages_from_listing(purl, source_archive_url, regex, ignored_files_and
10291030
continue
10301031

10311032
modified_time = file.modified
1032-
date = datetime.utcfromtimestamp(time.mktime(modified_time))
1033+
date = time.strftime("%Y-%m-%dT%H:%M:%S", modified_time)
10331034

10341035
download_url = urljoin(source_archive_url, file.name)
10351036
package_url = PackageURL(
@@ -1042,7 +1043,7 @@ def get_packages_from_listing(purl, source_archive_url, regex, ignored_files_and
10421043
Package(
10431044
homepage_url=source_archive_url,
10441045
download_url=download_url,
1045-
release_date=date.isoformat(),
1046+
release_date=date,
10461047
**package_url.to_dict(),
10471048
)
10481049
)

0 commit comments

Comments
 (0)