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
+1 -1
View File
@@ -5,7 +5,7 @@ extension UTCDateExtension on UTCDate? {
String formatDate({String pattern = 'yMMMd', String locale = 'en_US'}) {
if (this != null) {
return DateFormat(pattern, locale).format(this!.value);
return DateFormat(pattern, locale).format(this!.value.toLocal());
} else {
return '';
}