Skip to content

Commit 3b329eb

Browse files
fix: Use UTC timezone for invoice issue dates (#5204)
1 parent 9223879 commit 3b329eb

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{general-date @record @props.options.timezone @props.options.dateFormat}}

app/controllers/account/billing/invoices/list.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
1818
{
1919
name : 'Date',
2020
valuePath : 'issuedAt',
21-
isSortable : true
21+
isSortable : true,
22+
cellComponent : 'ui-table/cell/cell-date',
23+
options: {
24+
timezone: 'UTC',
25+
dateFormat: 'MMMM DD, YYYY'
26+
}
2227
},
2328
{
2429
name : 'Amount',

app/routes/event-invoice/review.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ export default class extends Route {
55
return this.l10n.tVar(`Review Event Invoice - ${model.get('identifier')}`);
66
}
77

8-
model(params) {
9-
return this.store.findRecord('event-invoice', params.invoice_identifier, {
8+
async model(params) {
9+
const model = await this.store.findRecord('event-invoice', params.invoice_identifier, {
1010
include : 'event,user',
1111
reload : true
1212
});
13+
await model.reload();
14+
return model;
1315
}
1416

1517
afterModel(model) {

app/templates/event-invoice/review.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<strong>{{t 'Event Name'}}:</strong> {{this.model.event.name}}
1616
</div>
1717
<div class="item">
18-
<strong>{{t 'Date Issued'}}:</strong> {{moment-format this.model.issuedAt 'MM/DD/YYYY'}}
18+
<strong>{{t 'Date Issued'}}:</strong> {{general-date this.model.issuedAt 'UTC' 'MMMM DD, YYYY'}}
1919
</div>
2020
<div class="item">
2121
<strong>{{t 'Total Invoice Amount'}}:</strong> {{currency-symbol this.model.event.paymentCurrency}} {{format-money this.model.amount}}

0 commit comments

Comments
 (0)