#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
parent ec99dafa29
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);
}
}
}