fix(api_handler): fix wrong date being shown for journeys going past midnight

This commit is contained in:
fbachus
2026-08-01 00:54:33 +02:00
parent 2b7b943ea2
commit 77949f6da6
3 changed files with 18 additions and 11 deletions
+13
View File
@@ -0,0 +1,13 @@
String timeOf(DateTime fullDT) {
// doing it this way so we always get two digits on the hour
String full = fullDT.toString();
List<String> splits = full.split(" ")[1].split(":");
String time = '${splits[0]}:${splits[1]}';
return time;
}
String dateOf(DateTime fullDT) {
String full = fullDT.toString();
String date = full.split(" ")[0];
return date;
}