Menu
Question Index
...


Write a program to convert from one time zone to another time zone. The time, source and target time zones are given.

Input (String, String, String) Output (String)
May 17 2013 (20:30:40), IST, Singapore May 17 2013 (23:00:40)
Oct 29 2011 (00:15:00), Japan, Israel Oct 28 2011 (17:15:00)
Sep 15  2013 (07:30:00), Europe, IST Sep 15 2013 (13:00:00)
Jan 01 2015 (6:00:30), Dubai, Canada Jan 01 2015 (02:00:30)

class ConvertFromOneTimeZoneToAnother

{    public static void main(String s[])
    {
        System.out.println("Converted from Indian Time to Singapore Time : " + convertToSpecificTimeZone("May 17 2013 (20:30:40)", "IST", "Singapore"));

    }


public static String convertToSpecificTimeZone(String sourceTime, String sourceTimeZone, String destinationTimeZone) {
//Write code here to convert from one time zone to another time zone.
return result;
}
}

Doubts

Problems

Topic: Locale Class In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App