diff --git a/flutter/lib/pages/message_view/message_view.dart b/flutter/lib/pages/message_view/message_view.dart index 9e1fbd3..b3282f0 100644 --- a/flutter/lib/pages/message_view/message_view.dart +++ b/flutter/lib/pages/message_view/message_view.dart @@ -140,6 +140,7 @@ class _MessageViewPageState extends State { Widget _buildMessageView(BuildContext context, SCNMessage message, ChannelPreview? channel, KeyTokenPreview? token, UserPreview? user) { final userAccUserID = context.select((v) => v.userID); + final dateFormat = context.select((v) => v.dateFormat).dateFormat(); var cfg = AppSettings(); @@ -229,7 +230,7 @@ class _MessageViewPageState extends State { } : null, ), - UI.metaCard(context: context, icon: FontAwesomeIcons.solidTimer, title: 'Timestamp', values: [message.timestamp]), + UI.metaCard(context: context, icon: FontAwesomeIcons.solidTimer, title: 'Timestamp', values: [dateFormat.format(DateTime.parse(message.timestamp).toLocal())]), if (cfg.showExtendedAttributes) UI.metaCard( context: context, @@ -319,7 +320,7 @@ class _MessageViewPageState extends State { children: [ UI.channelChip(context: context, text: _resolveChannelName(channel, message), margin: const EdgeInsets.fromLTRB(0, 0, 4, 0), fontSize: 16), Expanded(child: SizedBox()), - Text(dateFormat.format(DateTime.parse(message.timestamp)), style: const TextStyle(fontSize: 14)), + Text(dateFormat.format(DateTime.parse(message.timestamp).toLocal()), style: const TextStyle(fontSize: 14)), ], ), SizedBox(height: 8),