diff --git a/BTCPayServer/Controllers/PullPaymentController.cs b/BTCPayServer/Controllers/PullPaymentController.cs index ca24e3fe9..c2d1c7c8c 100644 --- a/BTCPayServer/Controllers/PullPaymentController.cs +++ b/BTCPayServer/Controllers/PullPaymentController.cs @@ -70,7 +70,8 @@ namespace BTCPayServer.Controllers ClaimedAmount = amountDue, AmountDueFormatted = _currencyNameTable.FormatCurrency(amountDue, blob.Currency), CurrencyData = cd, - LastUpdated = DateTime.Now, + StartDate = pp.StartDate, + LastRefreshed = DateTime.Now, Payouts = payouts .Select(entity => new ViewPullPaymentModel.PayoutLine { diff --git a/BTCPayServer/Models/ViewPullPaymentModel.cs b/BTCPayServer/Models/ViewPullPaymentModel.cs index 603d8517a..05071240d 100644 --- a/BTCPayServer/Models/ViewPullPaymentModel.cs +++ b/BTCPayServer/Models/ViewPullPaymentModel.cs @@ -76,7 +76,8 @@ namespace BTCPayServer.Models public string EmbeddedCSS { get; set; } public string CustomCSSLink { get; set; } public List Payouts { get; set; } = new List(); - public DateTime LastUpdated { get; set; } + public DateTimeOffset StartDate { get; set; } + public DateTime LastRefreshed { get; set; } public CurrencyData CurrencyData { get; set; } public string AmountCollectedFormatted { get; set; } public string AmountFormatted { get; set; } diff --git a/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml b/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml index ef722b819..7a1c1a199 100644 --- a/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml +++ b/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml @@ -88,10 +88,15 @@ {

@Model.Title

} +
+ Start Date +   + @Model.StartDate.ToBrowserDate() +
Last Updated   - @Model.LastUpdated.ToString("g") + @Model.LastRefreshed.ToBrowserDate() diff --git a/BTCPayServer/Views/Server/Files.cshtml b/BTCPayServer/Views/Server/Files.cshtml index 71f6fac30..10962ed70 100644 --- a/BTCPayServer/Views/Server/Files.cshtml +++ b/BTCPayServer/Views/Server/Files.cshtml @@ -28,7 +28,7 @@ { @file.FileName - @file.Timestamp.ToBrowserDate2() + @file.Timestamp.ToBrowserDate() @file.ApplicationUser.UserName Get Link diff --git a/BTCPayServer/Views/ViewsRazor.cs b/BTCPayServer/Views/ViewsRazor.cs index ef41d0c67..0ba2ec818 100644 --- a/BTCPayServer/Views/ViewsRazor.cs +++ b/BTCPayServer/Views/ViewsRazor.cs @@ -28,15 +28,16 @@ namespace BTCPayServer.Views public static HtmlString ToBrowserDate(this DateTimeOffset date) { - var hello = date.ToString("o", CultureInfo.InvariantCulture); - return new HtmlString($"{hello}"); + var displayDate = date.ToString("g"); + return new HtmlString($"{displayDate}"); } - public static HtmlString ToBrowserDate2(this DateTime date) + public static HtmlString ToBrowserDate(this DateTime date) { - var hello = date.ToString("o", CultureInfo.InvariantCulture); - return new HtmlString($"{hello}"); + var displayDate = date.ToString("g"); + return new HtmlString($"{displayDate}"); } + public static string ToTimeAgo(this DateTimeOffset date) { var formatted = (DateTimeOffset.UtcNow - date).TimeString() + " ago";