Skip to content

Commit

Permalink
Fix date parsing error for EC firmwares released before 10 AM
Browse files Browse the repository at this point in the history
Fixes #61
  • Loading branch information
Sparronator9999 committed Feb 16, 2025
1 parent bcd1b3d commit ecb66d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YAMDCC.Service/FanControlService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected override void OnStart(string[] args)
try
{
string temp = $"{ecDate.Substring(4, 4)}-{ecDate.Substring(0, 2)}-{ecDate.Substring(2, 2)}" +
$"T{ecDate.Substring(8, 2)}:{ecDate.Substring(11, 2)}:{ecDate.Substring(14, 2)}";
$"T{ecDate.Substring(8, 2).Replace(' ', '0')}:{ecDate.Substring(11, 2)}:{ecDate.Substring(14, 2)}";
EcInfo.Date = DateTime.ParseExact(temp, "s", CultureInfo.InvariantCulture);
Log.Debug($"EC firmware date: {EcInfo.Date:G}");
}
Expand Down

0 comments on commit ecb66d5

Please sign in to comment.