0x5bfa / FluentHub

A stylish yet powerful GitHub client for Windows
MIT License
1.06k stars 51 forks source link

Bug: Chinese DateTime not recognised #449

Open BreadKat0707 opened 7 months ago

BreadKat0707 commented 7 months ago

Before you start

What version of Windows is this issue present?

Windows 11 Dev

What version/architecture of FluentHub are you on?

0.8.60.0 | X64 | RELEASE

Description

When I try to open a repository, the page content flashes and then says Something went wrong string "time" was not recognized as a valid datetime 图片

Steps To Reproduce

No response

Expected behavior

Successfully open a repo page

Stack Trace

Stack trace details
at System.DateTimeOffset.Parse(String input) at FluentHub.Octokit.Queries.Repositories.TreeQueries.GetWithObjectNameAsync(String name, String owner, String refs, String path) at FluentHub.App.ViewModels.Repositories.Codes.DetailsLayoutViewModel.LoadRepositoryContentsAsync(String login, String name, String branch, String path) at FluentHub.App.ViewModels.Repositories.Codes.DetailsLayoutViewModel.LoadDetailsViewPageAsync()

Assets

2023-12-31 22:18:50.777 +08:00 [ERR] LoadRepositoryContentsAsync System.FormatException: String '2023.12.31.星期日 上午 08:28:59' was not recognized as a valid DateTime. at System.DateTimeOffset.Parse(String input) at FluentHub.Octokit.Queries.Repositories.TreeQueries.GetWithObjectNameAsync(String name, String owner, String refs, String path) at FluentHub.App.ViewModels.Repositories.Codes.DetailsLayoutViewModel.LoadRepositoryContentsAsync(String login, String name, String branch, String path) at FluentHub.App.ViewModels.Repositories.Codes.DetailsLayoutViewModel.LoadDetailsViewPageAsync() 2023-12-31 22:20:18.782 +08:00 [ERR] LoadRepositoryContentsAsync System.FormatException: String '2023.03.29.星期三 上午 10:04:46' was not recognized as a valid DateTime. at System.DateTimeOffset.Parse(String input) at FluentHub.Octokit.Queries.Repositories.TreeQueries.GetWithObjectNameAsync(String name, String owner, String refs, String path) at FluentHub.App.ViewModels.Repositories.Codes.DetailsLayoutViewModel.LoadRepositoryContentsAsync(String login, String name, String branch, String path) at FluentHub.App.ViewModels.Repositories.Codes.DetailsLayoutViewModel.LoadDetailsViewPageAsync()

0x5bfa commented 6 months ago

Thank you for the feedback. I guess Chinese version date time string is not recognized as a valid DataTime conversion target. I'm gonna investigate the cause and fix, but note that I don't have much time these days.