Skip to content

Commit

Permalink
Fix GitHub date (re-)parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed May 22, 2020
1 parent 075abf2 commit df7afc0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Netkan/Sources/Github/GithubApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ public IEnumerable<GithubRelease> GetAllReleases(GithubRef reference)
{
Log.Debug("Using GitHub source archive");
download = new Uri((string)release["zipball_url"]);
if (DateTime.TryParse(release["published_at"].ToString(), out parsed))
{
updated = parsed;
}
updated = (DateTime)release["published_at"];
}
else
{
Expand All @@ -101,10 +98,7 @@ public IEnumerable<GithubRelease> GetAllReleases(GithubRef reference)
{
Log.DebugFormat("Using GitHub asset: {0}", asset["name"]);
download = new Uri((string)asset["browser_download_url"]);
if (DateTime.TryParse(asset["updated_at"].ToString(), out parsed))
{
updated = parsed;
}
updated = (DateTime)asset["updated_at"];
break;
}
}
Expand Down

0 comments on commit df7afc0

Please sign in to comment.