The Python time.strftime
docs say:
When used with the strptime() function, the
%p
directive only
affects the output hour field if the%I
directive is used to parse
the hour.
Sure enough, changing your %H
to %I
makes it work.
The Python time.strftime
docs say:
When used with the strptime() function, the
%p
directive only
affects the output hour field if the%I
directive is used to parse
the hour.
Sure enough, changing your %H
to %I
makes it work.