Repository navigation
Description
Summary
Task dates in the app (due date, start date, end date, reminders) are always rendered in 24-hour time. There is no way to get 12-hour AM/PM display: the format is hardcoded, so it ignores the user's Vikunja Time format setting, the device locale, and Android's system "Use 24-hour format" toggle.
Root cause
lib/core/utils/date_extensions.dart uses add_Hm(), which is the locale-independent 24-hour skeleton (H = hour 0–23):
app/lib/core/utils/date_extensions.dart
Lines 1 to 11 in 95be795
| import 'package:intl/intl.dart'; | |
| extension DateExtensions on DateTime { | |
| String formatShort([String? locale]) { | |
| return dateFormatShort().format(this); | |
| } | |
| } | |
| DateFormat dateFormatShort([String? locale]) { | |
| return DateFormat.yMMMd(locale).add_Hm(); | |
| } |
DateFormat dateFormatShort([String? locale]) {
return DateFormat.yMMMd(locale).add_Hm(); // <- always 24h
}This drives every task date shown in the UI, via formatShort() in task_bottom_sheet.dart (due/start/end/reminder) and add_task_dialog.dart, plus the editable VikunjaDateTimeField (date_time_field.dart:27).
Notably the app is already inconsistent with itself — task_comments.dart:150 uses add_jm(), the locale-aware skeleton (j), so comment timestamps correctly show AM/PM while the task's own due date right above them shows 24-hour.
Secondary bug (same file)
formatShort accepts a locale parameter and then silently drops it — it calls dateFormatShort() with no argument instead of dateFormatShort(locale):
String formatShort([String? locale]) {
return dateFormatShort().format(this); // <- locale ignored
}Steps to reproduce
- In the web frontend, set Settings → General → Localization → Date display format to a non-relative option, then Time format → 12-hour (AM/PM).
- Open the same account in the Android app on an
en_USdevice with system 24-hour format off. - Open any task with a due time.
Expected: Sep 5, 2026 3:00 PM
Actual: Sep 5, 2026 15:00
Notes / suggested fix
The minimal fix is add_jm() instead of add_Hm(), matching task_comments.dart — j resolves to whatever the locale uses, so en_US gets AM/PM and locales like de_DE keep 24-hour. Passing the locale argument through would fix the second bug at the same time.
A fuller fix would honor the server-side preference: the app already parses frontend_settings into User (lib/data/models/user_dto.dart:34, lib/domain/entities/user.dart:4) but never reads the timeFormat key (12h / 24h) the web frontend writes there, so the setting users find in the web UI has no effect on mobile. Happy to send a PR for whichever direction you prefer.
Environment
- App:
go-vikunja/app@95be795(pubspec0.1.8-beta) - Platform: Android
Activity
leschbenedikt commentedon Nov 14, 2026
I just tested this and this will be fixed in the new app