(Actually)Fix wrong message time

Forgot to account for 0:XX am in previous commit
This commit is contained in:
Lorem 2020-07-20 22:38:39 +05:30
parent 896e8ce2b3
commit ebb0453d56
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ extension DateTimeExtension on DateTime {
/// Returns a simple time String.
/// TODO: Add localization
String localizedTimeOfDay(BuildContext context) {
return L10n.of(context).timeOfDay(_z(hour == 12 ? hour : hour % 12),
return L10n.of(context).timeOfDay(_z(hour % 12 == 0 ? 12 : hour % 12),
_z(hour), _z(minute), hour > 11 ? 'pm' : 'am');
}