I am trying to solve this exercise in PHP from a Python book
Write a program that converts a time from one time zone to another. The user enters the time in the usual American way, such as 3:48pm or 11:26am. The first time zone the user enters is that of the original time and the second is the desired time zone. The possible time zones are Eastern, Central, Mountain, or Pacific. Time: 11:48pm Starting zone: Pacific Ending zone: Eastern 2:48am
Struggling to come with a logic to solve it.
At the moment I am thinking about
IF AM
Switch
16 different cases
IF PM
Switch
16 different cases
but it seems a stupid way of doing it.
Any ideas?