Hear Ye! Hear Ye! It's Zulu Time again. Nothing has changed. But since you have encountered this in the trial run, then you should have talked about how to solve this in your team! :D
Description
According to Wikipedia, the Coordinated Universal Time (french: temps universel coordonn ́e), abbreviated as UTC, is the world’s primary standard time that regulates clocks and times. Its main use is to express Time Zones around the world by using positive or negative time offsets from UTC. See list below.
The time zone is sometimes denoted by UTC00:00 or the letter Z. In Nato’s Phonetic Alphabet, Z is Zulu. Thus, UTC is sometimes known as the Zulu Time. In aviation, Zulu Time is the universal standard. This ensures that pilots, regardless of their location, follows the same 24-hour clock and avoid confusion when flying in between time zones. In the table above, UTC+08:00 (Hotel Time Zone) is a time offset that adds 8 hours to UTC. Thus, if it’s 1200 hours (12:00PM) Zulu Time then it is 2000 hours (08:00PM) Hotel Time.
Your task is to create a program that converts the time in a given time zone to the desired time zone.
INPUT FORMAT
Each line contains input data that follows the following format: 24-hour time, followed by the uppercase letter of the given time zone (Y for Yankee Time Zone) and the uppercase letter of the desired time zone. Say the input is 0800AB. This means that 08:00AM Alpha Time is 09:00AM Bravo Time.
OUTPUT FORMAT
For each input read, display the correct time conversion following the 12-hour format, followed by a space, then an indication whether time converted is: ‘next day’, ‘previous day’, or ‘current day’. See sample output below.
For malformed input, display “Malformed”.