diff --git a/lib/widgets/posts/post_item.dart b/lib/widgets/posts/post_item.dart index 520fed7..bf9b8e6 100644 --- a/lib/widgets/posts/post_item.dart +++ b/lib/widgets/posts/post_item.dart @@ -49,9 +49,9 @@ class _PostItemState extends State { Widget buildDate() { if (widget.isFullDate) { - return Text(DateFormat('y/M/d H:m').format(item.createdAt)); + return Text(DateFormat('y/M/d H:m').format(item.createdAt.toLocal())); } else { - return Text(format(item.createdAt, locale: 'en_short')); + return Text(format(item.createdAt.toLocal(), locale: 'en_short')); } } @@ -87,7 +87,7 @@ class _PostItemState extends State { List labels = List.empty(growable: true); if (widget.item.createdAt != widget.item.updatedAt) { labels.add('postEdited'.trParams({ - 'date': DateFormat('yy/M/d H:m').format(item.updatedAt), + 'date': DateFormat('yy/M/d H:m').format(item.updatedAt.toLocal()), })); } if (widget.item.realm != null) {