From 32c2d130f6eb65629fa0f1eccc14b1c3323f04ba Mon Sep 17 00:00:00 2001 From: Hannu Lyytikainen Date: Fri, 25 Oct 2019 23:04:21 +0300 Subject: [PATCH 1/2] Add default tz param to date formatting --- .../booking-request-accepted-html.html | 10 +++++----- .../booking-request-auto-declined-html.html | 4 ++-- .../booking-request-declined-html.html | 4 ++-- .../templates/money-paid/money-paid-html.html | 10 +++++----- .../new-booking-request/new-booking-request-html.html | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ext/transaction-process/templates/booking-request-accepted/booking-request-accepted-html.html b/ext/transaction-process/templates/booking-request-accepted/booking-request-accepted-html.html index 70ffc450ff..7eaf802e88 100644 --- a/ext/transaction-process/templates/booking-request-accepted/booking-request-accepted-html.html +++ b/ext/transaction-process/templates/booking-request-accepted/booking-request-accepted-html.html @@ -4,7 +4,7 @@ {{~/inline~}} {{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} +{{date date format="MMM d, YYYY" tz="Etc/UTC"}} {{~/inline~}} @@ -48,12 +48,12 @@

Your booking request was accepted!

End date - {{date booking.start format="EEEE"}} - {{date booking.end format="EEEE"}} + {{date booking.start format="EEEE" tz="Etc/UTC"}} + {{date booking.end format="EEEE" tz="Etc/UTC"}} - {{date booking.start format="MMM d"}} - {{date booking.end format="MMM d"}} + {{date booking.start format="MMM d" tz="Etc/UTC"}} + {{date booking.end format="MMM d" tz="Etc/UTC"}} {{#each tx-line-items}} diff --git a/ext/transaction-process/templates/booking-request-auto-declined/booking-request-auto-declined-html.html b/ext/transaction-process/templates/booking-request-auto-declined/booking-request-auto-declined-html.html index 1e280e7731..2a79f361d5 100644 --- a/ext/transaction-process/templates/booking-request-auto-declined/booking-request-auto-declined-html.html +++ b/ext/transaction-process/templates/booking-request-auto-declined/booking-request-auto-declined-html.html @@ -1,6 +1,6 @@ {{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} +{{date date format="MMM d, YYYY" tz="Etc/UTC"}} {{~/inline~}} @@ -17,4 +17,4 @@

Your booking request has expired.

You have received this email notification because you are a member of {{marketplace.name}}. If you no longer wish to receive these emails, please contact {{marketplace.name}} team.

- \ No newline at end of file + diff --git a/ext/transaction-process/templates/booking-request-declined/booking-request-declined-html.html b/ext/transaction-process/templates/booking-request-declined/booking-request-declined-html.html index 6ab4bff19c..d1580e9ccb 100644 --- a/ext/transaction-process/templates/booking-request-declined/booking-request-declined-html.html +++ b/ext/transaction-process/templates/booking-request-declined/booking-request-declined-html.html @@ -1,6 +1,6 @@ {{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} +{{date date format="MMM d, YYYY" tz="Etc/UTC"}} {{~/inline~}} @@ -17,4 +17,4 @@

Your booking request was declined.

You have received this email notification because you are a member of {{marketplace.name}}. If you no longer wish to receive these emails, please contact {{marketplace.name}} team.

- \ No newline at end of file + diff --git a/ext/transaction-process/templates/money-paid/money-paid-html.html b/ext/transaction-process/templates/money-paid/money-paid-html.html index 40b378d26b..f65f321e5a 100644 --- a/ext/transaction-process/templates/money-paid/money-paid-html.html +++ b/ext/transaction-process/templates/money-paid/money-paid-html.html @@ -4,7 +4,7 @@ {{~/inline~}} {{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} +{{date date format="MMM d, YYYY" tz="Etc/UTC"}} {{~/inline~}} @@ -48,12 +48,12 @@

You have been paid {{> format-money money=payout-total}}

End date - {{date booking.start format="EEEE"}} - {{date booking.end format="EEEE"}} + {{date booking.start format="EEEE" tz="Etc/UTC"}} + {{date booking.end format="EEEE" tz="Etc/UTC"}} - {{date booking.start format="MMM d"}} - {{date booking.end format="MMM d"}} + {{date booking.start format="MMM d" tz="Etc/UTC"}} + {{date booking.end format="MMM d" tz="Etc/UTC"}} diff --git a/ext/transaction-process/templates/new-booking-request/new-booking-request-html.html b/ext/transaction-process/templates/new-booking-request/new-booking-request-html.html index af6a486945..2a25b25b24 100644 --- a/ext/transaction-process/templates/new-booking-request/new-booking-request-html.html +++ b/ext/transaction-process/templates/new-booking-request/new-booking-request-html.html @@ -4,7 +4,7 @@ {{~/inline~}} {{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} +{{date date format="MMM d, YYYY" tz="Etc/UTC"}} {{~/inline~}} @@ -45,12 +45,12 @@

Please respond to a request by {{customer.display-name}}

End date - {{date booking.start format="EEEE"}} - {{date booking.end format="EEEE"}} + {{date booking.start format="EEEE" tz="Etc/UTC"}} + {{date booking.end format="EEEE" tz="Etc/UTC"}} - {{date booking.start format="MMM d"}} - {{date booking.end format="MMM d"}} + {{date booking.start format="MMM d" tz="Etc/UTC"}} + {{date booking.end format="MMM d" tz="Etc/UTC"}} From 4e61bd91a40147e289c7281950c4cc436d420495 Mon Sep 17 00:00:00 2001 From: Hannu Lyytikainen Date: Mon, 28 Oct 2019 13:41:52 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b774711198..ce8cd37a23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2019-XX-XX +- [add] Add default timezone to date formatting in example transaction process + email templates. + [#1227](https://github.com/sharetribe/flex-template-web/pull/1227) - [change] Update @formatjs/intl-relativetimeformat from 2.8.3 to 4.2.1 [#1222](https://github.com/sharetribe/flex-template-web/pull/1222) - [fix] Use currency of the `lineItem` on every line of the `BookingBreakdown` if possible.