Skip to content

Commit

Permalink
Merge pull request #17 from mcrossley/main
Browse files Browse the repository at this point in the history
v2.0.1
  • Loading branch information
mcrossley authored Jun 20, 2024
2 parents b5302b3 + 1eddc25 commit e51b6c8
Show file tree
Hide file tree
Showing 6 changed files with 387 additions and 411 deletions.
12 changes: 4 additions & 8 deletions CreateMissing.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyVersion>$(PackageVersion)</AssemblyVersion>
<FileVersion>$(PackageVersion)</FileVersion>
<Version>1.4.3</Version>
<Version>2.0.1.0003</Version>
<StartupObject>CreateMissing.Program</StartupObject>
<TargetFramework>net48</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Authors>Mark Crossley</Authors>
<Company>Cumulus MX</Company>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(ConfigurationName)==Release (&#xD;&#xA;echo.&#xD;&#xA;echo Update Distribution folder&#xD;&#xA;echo copy .exe&#xD;&#xA;xcopy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\CumulusMX-Dist\CumulusMX&quot; /D /-I /Q /Y&#xD;&#xA;echo copy .config&#xD;&#xA;xcopy &quot;$(TargetPath).config&quot; &quot;$(SolutionDir)..\CumulusMX-Dist\CumulusMX&quot; /D /-I /Q /Y&#xD;&#xA;)" />
<Exec Command="if $(ConfigurationName)==Release (&#xD;&#xA;echo.&#xD;&#xA;echo Update Distribution folder&#xD;&#xA;echo copy .exe&#xD;&#xA;xcopy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\CumulusMX-Dist.Net\CumulusMX&quot; /D /-I /Q /Y&#xD;&#xA;xcopy &quot;$(OutputPath)\CreateMissing.exe&quot; &quot;$(SolutionDir)..\CumulusMX-Dist.Net\CumulusMX&quot; /D /-I /Q /Y&#xD;&#xA;&#xD;&#xA;echo copy .config&#xD;&#xA;xcopy &quot;$(OutputPath)\CreateMissing.runtimeconfig.json&quot; &quot;$(SolutionDir)..\CumulusMX-Dist.Net\CumulusMX&quot; /D /-I /Q /Y&#xD;&#xA;)" />
</Target>

</Project>
</Project>
28 changes: 28 additions & 0 deletions Cumulus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,34 @@ private void ReadIniFile()
}
}

public int GetHourInc(DateTime timestamp)
{
if (RolloverHour == 0)
{
return 0;
}
else
{
try
{
if (Use10amInSummer && TimeZoneInfo.Local.IsDaylightSavingTime(timestamp))
{
// Locale is currently on Daylight time
return -10;
}
else
{
// Locale is currently on Standard time or unknown
return -9;
}
}
catch (Exception)
{
return -9;
}
}
}

}

internal class StationUnits
Expand Down
Loading

0 comments on commit e51b6c8

Please sign in to comment.