I am having problem in converting military time to standard.
The task I have is to take time from different cities around the world, adjust it to eastern time, and then display it in standard format with AM or PM.
User gave time for london 23:40
I scan the hour scanf("%d", &londontime);
then I adjust it to eastern time
adjustedtime = 23 - 5;
now its 18:40 est
which should be 6:40 EST in standard form
what should be the formula to calculate it?
after that I cant figure out how to put it in standard form and figure out if its AM or PM. I am aware its a simple task but my brain isnt fully functioning right now. And I need to get this done asap, and submit it.
would appreciate some help.