From 259b6912549fc53f09b2e0c97c6735523ef43480 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 2 Nov 2024 19:30:37 +0300 Subject: [PATCH] fix(ui): Backup timestamps are now in local timezone. Fixes #230 --- lib/ui/pages/backups/backup_details.dart | 2 +- lib/ui/pages/backups/backups_list.dart | 2 +- lib/ui/pages/backups/snapshot_modal.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 52650cfa..1235a286 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -358,7 +358,7 @@ class BackupDetailsPage extends StatelessWidget { style: TextStyle( color: overrideColor, ), - '${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}', + '${MaterialLocalizations.of(context).formatShortDate(backup.time.toLocal())} ${TimeOfDay.fromDateTime(backup.time.toLocal()).format(context)}', ), subtitle: Text( style: TextStyle( diff --git a/lib/ui/pages/backups/backups_list.dart b/lib/ui/pages/backups/backups_list.dart index e37a41a5..6c667d68 100644 --- a/lib/ui/pages/backups/backups_list.dart +++ b/lib/ui/pages/backups/backups_list.dart @@ -81,7 +81,7 @@ class BackupsListPage extends StatelessWidget { ); }, title: Text( - '${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}', + '${MaterialLocalizations.of(context).formatShortDate(backup.time.toLocal())} ${TimeOfDay.fromDateTime(backup.time.toLocal()).format(context)}', ), subtitle: Text( service?.displayName ?? backup.fallbackServiceName, diff --git a/lib/ui/pages/backups/snapshot_modal.dart b/lib/ui/pages/backups/snapshot_modal.dart index 9ef77e46..5eadc752 100644 --- a/lib/ui/pages/backups/snapshot_modal.dart +++ b/lib/ui/pages/backups/snapshot_modal.dart @@ -95,7 +95,7 @@ class _SnapshotModalState extends State { 'backup.snapshot_creation_time_title'.tr(), ), subtitle: Text( - '${MaterialLocalizations.of(context).formatShortDate(widget.snapshot.time)} ${TimeOfDay.fromDateTime(widget.snapshot.time).format(context)}', + '${MaterialLocalizations.of(context).formatShortDate(widget.snapshot.time.toLocal())} ${TimeOfDay.fromDateTime(widget.snapshot.time.toLocal()).format(context)}', ), ), SnapshotIdListTile(snapshotId: widget.snapshot.id),