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:
parent
1e0bd0b51b
commit
6e3c6df200
3 changed files with 5 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ import 'widgets/widgets.dart';
|
|||
/// Studio's own build version. Bump on every UI commit so the
|
||||
/// running app self-identifies — visible in the sidebar header
|
||||
/// 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 {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
|
|
|||
|
|
@ -143,9 +143,11 @@ class _AuditPageState extends State<AuditPage> {
|
|||
local.month == now.month &&
|
||||
local.day == now.day;
|
||||
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 dd = local.day.toString().padLeft(2, '0');
|
||||
if (local.year == now.year) return '$mo-$dd $time';
|
||||
return '${local.year}-$mo-$dd $time';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue