When i convert datetime to timestamp with am/pm and return timestamp back to datetime again it alway return 'am' even the actually datetime that i input is have 'pm'
This is my code.
from datetime import date, datetime
# convert datetime to timestamp
dt_tsp = datetime.timestamp(datetime.strptime('09 June 2020 02:47 PM', '%d %B %Y %H:%M %p'))
# convert timestramp to datetime
tsp_dt = datetime.fromtimestamp(dt_tsp).strftime('%d %B %Y %H:%M %p')
# result
print(tsp_dt)
# 09 June 2020 02:47 AM // alway am
So how can i fix the problem