From d7a5021ed2c8f8bbaec530cbcedd968c419ed278 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Sat, 26 May 2018 09:35:42 -0500 Subject: [PATCH] Updating Invoice details to show local date time --- BTCPayServer/Views/Invoice/Invoice.cshtml | 8 ++++---- BTCPayServer/Views/Invoice/ListInvoices.cshtml | 2 +- BTCPayServer/Views/ViewsRazor.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BTCPayServer/Views/Invoice/Invoice.cshtml b/BTCPayServer/Views/Invoice/Invoice.cshtml index 343d3c613..cb3cc5699 100644 --- a/BTCPayServer/Views/Invoice/Invoice.cshtml +++ b/BTCPayServer/Views/Invoice/Invoice.cshtml @@ -53,15 +53,15 @@ Created date - @Model.CreatedDate + @Model.CreatedDate.ToBrowserDate() Expiration date - @Model.ExpirationDate + @Model.ExpirationDate.ToBrowserDate() Monitoring date - @Model.MonitoringDate + @Model.MonitoringDate.ToBrowserDate() Transaction speed @@ -289,7 +289,7 @@ @foreach(var evt in Model.Events) { - @evt.Timestamp + @evt.Timestamp.ToBrowserDate() @evt.Message } diff --git a/BTCPayServer/Views/Invoice/ListInvoices.cshtml b/BTCPayServer/Views/Invoice/ListInvoices.cshtml index 4d90ef99f..e7bc473d9 100644 --- a/BTCPayServer/Views/Invoice/ListInvoices.cshtml +++ b/BTCPayServer/Views/Invoice/ListInvoices.cshtml @@ -66,7 +66,7 @@ @foreach(var invoice in Model.Invoices) { - @invoice.Date.BrowserDate() + @invoice.Date.ToBrowserDate() @if(invoice.RedirectUrl != string.Empty) { diff --git a/BTCPayServer/Views/ViewsRazor.cs b/BTCPayServer/Views/ViewsRazor.cs index 2a83b810e..6affde624 100644 --- a/BTCPayServer/Views/ViewsRazor.cs +++ b/BTCPayServer/Views/ViewsRazor.cs @@ -25,7 +25,7 @@ namespace BTCPayServer.Views return page.Equals(activePage) ? "active" : null; } - public static HtmlString BrowserDate(this DateTimeOffset date) + public static HtmlString ToBrowserDate(this DateTimeOffset date) { var hello = date.ToString("o", CultureInfo.InvariantCulture); return new HtmlString($"{hello}");