mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
#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:
parent
ec99dafa29
commit
3dbef199aa
11 changed files with 61 additions and 11 deletions
14
PlexRequests.Helpers/DateTimeHelper.cs
Normal file
14
PlexRequests.Helpers/DateTimeHelper.cs
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue