Updating Invoice details to show local date time

This commit is contained in:
rockstardev 2018-05-26 09:35:42 -05:00 committed by nicolas.dorier
parent 63ec832667
commit d7a5021ed2
3 changed files with 6 additions and 6 deletions

View File

@ -53,15 +53,15 @@
</tr>
<tr>
<th>Created date</th>
<td>@Model.CreatedDate</td>
<td>@Model.CreatedDate.ToBrowserDate()</td>
</tr>
<tr>
<th>Expiration date</th>
<td>@Model.ExpirationDate</td>
<td>@Model.ExpirationDate.ToBrowserDate()</td>
</tr>
<tr>
<th>Monitoring date</th>
<td>@Model.MonitoringDate</td>
<td>@Model.MonitoringDate.ToBrowserDate()</td>
</tr>
<tr>
<th>Transaction speed</th>
@ -289,7 +289,7 @@
@foreach(var evt in Model.Events)
{
<tr>
<td>@evt.Timestamp</td>
<td>@evt.Timestamp.ToBrowserDate()</td>
<td>@evt.Message</td>
</tr>
}

View File

@ -66,7 +66,7 @@
@foreach(var invoice in Model.Invoices)
{
<tr>
<td>@invoice.Date.BrowserDate()</td>
<td>@invoice.Date.ToBrowserDate()</td>
<td>
@if(invoice.RedirectUrl != string.Empty)
{

View File

@ -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($"<span class='localizeDate'>{hello}</span>");