From d0276f9ac67b422847829efd86b57200265dd997 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 26 Mar 2025 22:51:09 +0800 Subject: [PATCH] :bug: Fix some date issue --- lib/screens/account/punishments.dart | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/screens/account/punishments.dart b/lib/screens/account/punishments.dart index 5700b8a..abd8dce 100644 --- a/lib/screens/account/punishments.dart +++ b/lib/screens/account/punishments.dart @@ -126,14 +126,20 @@ class _PunishmentsScreenState extends State { Text(ele.reason), const Gap(4), Text( - 'punishmentCreatedAt' - .tr(args: [DateFormat().format(ele.createdAt)]), + 'punishmentCreatedAt'.tr(args: [ + DateFormat().format( + ele.createdAt.toLocal(), + ) + ]), ).opacity(0.8), Text( ele.expiredAt == null ? 'punishmentExpiredNever'.tr() - : 'punishmentExpiredAt'.tr( - args: [DateFormat().format(ele.expiredAt!)]), + : 'punishmentExpiredAt'.tr(args: [ + DateFormat().format( + ele.expiredAt!.toLocal(), + ) + ]), ).opacity(0.8), const Gap(8), if (ele.moderator != null)