Skip to content

Commit

Permalink
升级到net7
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHtml committed Jan 4, 2023
1 parent 1c4261b commit 5e8fd46
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
8 changes: 2 additions & 6 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
using TimeZoneConverter;
using System.Text.Json;
using Util.Mail;

namespace WeatherNotify
Expand Down Expand Up @@ -32,7 +28,7 @@ static async Task Main()
}

string dayInfo = "今日";
DateTime nowTime_CN = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TZConvert.GetTimeZoneInfo("China Standard Time"));
DateTime nowTime_CN = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("China Standard Time"));
if (nowTime_CN.Hour > 12)
{
nowTime_CN = nowTime_CN.AddDays(1d);
Expand Down
7 changes: 4 additions & 3 deletions WeatherNotify.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MailKit" Version="2.8.0" />
<PackageReference Include="TimeZoneConverter" Version="3.2.0" />
<PackageReference Include="MailKit" Version="3.4.3" />
</ItemGroup>

</Project>
16 changes: 8 additions & 8 deletions WeatherNotify.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30320.27
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeatherNotify", "WeatherNotify.csproj", "{B46D977F-B6B1-4EE9-BC07-9BCEBE4AE486}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeatherNotify", "WeatherNotify.csproj", "{1E5BDA11-E22E-4734-A42B-5254B3A54697}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B46D977F-B6B1-4EE9-BC07-9BCEBE4AE486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B46D977F-B6B1-4EE9-BC07-9BCEBE4AE486}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B46D977F-B6B1-4EE9-BC07-9BCEBE4AE486}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B46D977F-B6B1-4EE9-BC07-9BCEBE4AE486}.Release|Any CPU.Build.0 = Release|Any CPU
{1E5BDA11-E22E-4734-A42B-5254B3A54697}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E5BDA11-E22E-4734-A42B-5254B3A54697}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E5BDA11-E22E-4734-A42B-5254B3A54697}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E5BDA11-E22E-4734-A42B-5254B3A54697}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B38816AB-B2A3-4BFF-8DC5-1BCDD01F0309}
SolutionGuid = {267B9D5F-A5DD-44BE-B09B-0D90E4275CE0}
EndGlobalSection
EndGlobal

0 comments on commit 5e8fd46

Please sign in to comment.