Fixing bug induced with server converting UTC times to server local (#835)

This commit is contained in:
Rockstar Developer 2019-05-15 08:02:39 -05:00 committed by Nicolas Dorier
parent 461462eafc
commit 20fb7fc188
3 changed files with 4 additions and 8 deletions

View File

@ -129,10 +129,10 @@ namespace BTCPayServer.Controllers
Title = vm.Title,
Enabled = vm.Enabled,
EnforceTargetAmount = vm.EnforceTargetAmount,
StartDate = vm.StartDate,
StartDate = vm.StartDate?.ToUniversalTime(),
TargetCurrency = vm.TargetCurrency,
Description = _htmlSanitizer.Sanitize( vm.Description),
EndDate = vm.EndDate,
EndDate = vm.EndDate?.ToUniversalTime(),
TargetAmount = vm.TargetAmount,
CustomCSSLink = vm.CustomCSSLink,
MainImageUrl = vm.MainImageUrl,

View File

@ -154,7 +154,7 @@ namespace BTCPayServer.Controllers
blob.Email = viewModel.Email;
blob.Description = _htmlSanitizer.Sanitize(viewModel.Description);
blob.Amount = viewModel.Amount;
blob.ExpiryDate = viewModel.ExpiryDate;
blob.ExpiryDate = viewModel.ExpiryDate?.ToUniversalTime();
blob.Currency = viewModel.Currency;
blob.EmbeddedCSS = viewModel.EmbeddedCSS;
blob.CustomCSSLink = viewModel.CustomCSSLink;

View File

@ -30,11 +30,7 @@
maxDate: max,
defaultDate: defaultDate,
time_24hr: true,
defaultHour: 0,
parseDate: function (date) {
// check with Kukks if this is still needed with new date format
return moment(date).toDate();
}
defaultHour: 0
});
}
});