mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
America/New_York timezone on non-windows
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core;
|
||||
@ -26,8 +27,13 @@ namespace Bit.Admin.Jobs
|
||||
|
||||
public override async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var timeZone = _globalSettings.SelfHosted ? TimeZoneInfo.Utc :
|
||||
TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
|
||||
var timeZone = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
|
||||
TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time") :
|
||||
TimeZoneInfo.FindSystemTimeZoneById("America/New_York");
|
||||
if(_globalSettings.SelfHosted)
|
||||
{
|
||||
timeZone = TimeZoneInfo.Utc;
|
||||
}
|
||||
|
||||
var everyTopOfTheHourTrigger = TriggerBuilder.Create()
|
||||
.StartNow()
|
||||
|
Reference in New Issue
Block a user