fix(ui): Backup timestamps are now in local timezone.

Fixes #230
This commit is contained in:
Inex Code 2024-11-02 19:30:37 +03:00
parent c0de078dbb
commit 259b691254
3 changed files with 3 additions and 3 deletions

View file

@ -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(

View file

@ -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,

View file

@ -95,7 +95,7 @@ class _SnapshotModalState extends State<SnapshotModal> {
'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),