fix(studio): always include year in non-today audit timestamps (v0.14.2)

Previous patch dropped the year for current-year events,
showing `05-04 21:25:39` — locale-ambiguous (US reads May 4,
EU reads 5 April). Operators should not have to guess. Now
every non-today timestamp renders as `YYYY-MM-DD HH:mm:ss`;
same-day events keep the compact `HH:mm:ss`.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-07 17:06:21 +02:00
parent 1e0bd0b51b
commit 6e3c6df200
3 changed files with 5 additions and 3 deletions

View file

@ -23,7 +23,7 @@ import 'widgets/widgets.dart';
/// Studio's own build version. Bump on every UI commit so the /// Studio's own build version. Bump on every UI commit so the
/// running app self-identifies visible in the sidebar header /// running app self-identifies visible in the sidebar header
/// and quick-glance proof that you're seeing the current build. /// and quick-glance proof that you're seeing the current build.
const String kStudioVersion = '0.14.1'; const String kStudioVersion = '0.14.2';
Future<void> main() async { Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();

View file

@ -143,9 +143,11 @@ class _AuditPageState extends State<AuditPage> {
local.month == now.month && local.month == now.month &&
local.day == now.day; local.day == now.day;
if (sameDay) return time; if (sameDay) return time;
// Older events always carry the full ISO date. `MM-dd`
// alone is locale-ambiguous (US reads it as May-04, EU as
// 5 April) operators should not have to guess.
final mo = local.month.toString().padLeft(2, '0'); final mo = local.month.toString().padLeft(2, '0');
final dd = local.day.toString().padLeft(2, '0'); final dd = local.day.toString().padLeft(2, '0');
if (local.year == now.year) return '$mo-$dd $time';
return '${local.year}-$mo-$dd $time'; return '${local.year}-$mo-$dd $time';
} }

View file

@ -1,7 +1,7 @@
name: fai_studio name: fai_studio
description: "F∆I Studio — desktop GUI for the F∆I hub" description: "F∆I Studio — desktop GUI for the F∆I hub"
publish_to: 'none' publish_to: 'none'
version: 0.14.1 version: 0.14.2
environment: environment:
sdk: ^3.11.0-200.1.beta sdk: ^3.11.0-200.1.beta