TF-113 [BUG] Date should be display in the local time zone

This commit is contained in:
dab246
2021-10-04 11:44:04 +07:00
committed by Dat H. Pham
parent d8aac0ba69
commit c475820353
2 changed files with 4 additions and 2 deletions
@@ -9,7 +9,9 @@ extension PresentationEmailExtension on PresentationEmail {
String getEmailDateTime(String newLocale, {String? pattern}) {
final emailTime = sentAt ?? receivedAt;
if (emailTime != null) {
return emailTime.formatDate(pattern: pattern ?? emailTime.value.toPattern(), locale: newLocale);
return emailTime.formatDate(
pattern: pattern ?? emailTime.value.toLocal().toPattern(),
locale: newLocale);
}
return '';
}