Date formatting isn't correctly taking into account AM/PM or A/P tokens when formatting the hour portion.
When given a format string such as h:mm:ss AM/PM and a date value with an hour component over 12 hours, such as 14, the result is in 24hr time instead of 12hr time, 14:00:00 PM.
The problem is in Formatter.cs. For the h token it is doing date.Hour.ToString("D" + digits) regardless of the existence of an AM/PM token.
Date formatting isn't correctly taking into account AM/PM or A/P tokens when formatting the hour portion.
When given a format string such as
h:mm:ss AM/PM
and a date value with an hour component over 12 hours, such as14
, the result is in 24hr time instead of 12hr time,14:00:00 PM
.The problem is in
Formatter.cs
. For the h token it is doingdate.Hour.ToString("D" + digits)
regardless of the existence of an AM/PM token.