The parsing line contains an “H” that tells your parser to interpret the value as a 24-hour hour of the day (0..23). Thus, 6 is interpreted as the 6th hour of the day. In the morning. The AM that is being printed is that the general date in question is considered morning.
If you want to use 12 hour time, change the format string to:
"EEEE, MMMM dd, yyyy h:mm:ss aa".
'h' will be interpreted as the 12-hour hour of the day (1..12)
robert_x44
source share