#122 store utc time in the databse + obtain timezone offset of the client upon login + offset times returned to client based on session offset

This commit is contained in:
Drewster727 2016-03-31 22:23:38 -05:00
commit 3dbef199aa
11 changed files with 61 additions and 11 deletions

View file

@ -0,0 +1,14 @@
using System;
namespace PlexRequests.Helpers
{
public static class DateTimeHelper
{
public static DateTimeOffset OffsetUTCDateTime(DateTime utcDateTime, int minuteOffset)
{
TimeSpan ts = TimeSpan.FromMinutes(-minuteOffset);
return new DateTimeOffset(utcDateTime).ToOffset(ts);
}
}
}

View file

@ -52,6 +52,7 @@
<ItemGroup>
<Compile Include="AssemblyHelper.cs" />
<Compile Include="ByteConverterHelper.cs" />
<Compile Include="DateTimeHelper.cs" />
<Compile Include="Exceptions\ApplicationSettingsException.cs" />
<Compile Include="HtmlRemover.cs" />
<Compile Include="ICacheProvider.cs" />